ethomson / adopt

A portable command-line argument parser
MIT License
18 stars 0 forks source link

adopt_spec->help not used? #2

Open georcon opened 2 years ago

georcon commented 2 years ago

There doesn't seem to be a way to print detailed usage information (rather than the usage synopsis). Is this accurate?

As per the example, I would have expected something like:

./example: either '-q' or '-l' is required.
usage: ./example [-v] (-q|-l) [-c <channel>] [--] <file1> [<file2>] [<other>...]
-v --verbose: Turn on verbose information
-q --quiet: Emit no output
-l --loud: Emit louder than usual output
[...]

`

ethomson commented 2 years ago

Hmm, yes, that does seem like an annoying oversight. For background, this project was primarily intended to be used in libgit2's cli, which means some of the bits remain living over there, including the help printing.

That seems like a thing that should probably move back over here.

georcon commented 2 years ago

Thanks for the response. Would you be open to a PR to add this functionality?