Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scope usage lines #24

Open
victor-gp opened this issue Jul 31, 2023 · 1 comment
Open

Scope usage lines #24

victor-gp opened this issue Jul 31, 2023 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@victor-gp
Copy link
Owner

In the work for #23, it became apparent that not handling usage lines blocks the handling other patterns.

In particular, most patterns that start with a subcommand (lowercase name), such as those reported in #3

It should be easy enough, here are some heuristics off the top of my head:

  • after section headings like "usage:" or "examples:"
  • first few lines at the beginning of the help message
  • stop handling them as usage lines after the first double break (two consecutive \n's)
This was referenced Jul 31, 2023
@victor-gp victor-gp added enhancement New feature or request help wanted Extra attention is needed labels Jul 31, 2023
@victor-gp
Copy link
Owner Author

Some examples:

bat-usage

ruby-usage

cp-usage

git-usage

grep-usage

apt-usage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant