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
Extend help subcommand #5354
Comments
I know at least My first concern is with how people discover this. People aren't likely to run
I would be loathe to add a blanket after help for people. Maybe them adding it is their way to "opt in". My second concern is I'm unsure if a flag is the right approach. I feel like this would be better served as a "topic" ( |
I don't completely understand the suggestion. Do you mean people adding a "table-of-contents" flag is opting in, or people adding an after_help is opting in? Isn't the latter ambiguous, as someone could add an after_help for other reasons?
I'd be fine with this. |
One idea is that we support |
Thanks for the clarification. I think you are saying that
|
Please complete the following tasks
Clap Version
4.5.0
Describe your use case
sq
is the command-line front end forsequoia-openpgp
. It has a dozen subcommands, and most of the subcommands have their own subcommands. This deep hierarchical structure means getting an overview ofsq
's functionality is not straightforward.Describe the solution you'd like
Most non-fiction books include a table of contents, which gives the reader a quick overview of what is covered and where. It would be nice if clap could offer similar functionality.
One idea what we had is to extended the
help
subcommand with an option, perhaps-a
, which recursively lists all subcommands. Right now,sq help
shows:-a
could perhaps show something like:I've spent some time looking at clap's documentation, but I couldn't find a way to extend the automatically generated
help
subcommand. One option would be to disable thehelp
subcommand and reimplement it insq
with the added functionality. This seems brittle, however.Alternatives, if applicable
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: