-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Is there a way to add subcommand options desc to the default help output #1624
Comments
Nice description, thanks. There is not direct support for adding subcommand options into the program help (top-level command). To do it yourself, you could subclass/override the Help class. The shortcut would be to override Line 224 in 950f742
The full-blown approach with more control would be to override For subcommands with a lot of options adding the options may be a bit noisy, but I can imagine it working for modest subcommands! |
Yeah understood, it is very hard to please each and every use-case. It is something that we should not expect to be a part of the default functionality, right? |
Correct. (Not at this time, based on current utility conventions, and current Commander feedback.) |
@shadowspawn Oh, just was thinking of this idea, to be able to mark some of the options to be shown this way. Currently
Option 1
Option 2
In that case Option 2 makes a lot of sense for such use-case |
Interesting idea to mark individual options, but I don't this this scales very well. No further activity in a month. Closing this as resolved. Feel free to open a new issue if it comes up again, with new information and renewed interest. |
Current output:
So in order to figure out options you have to run another command
cmd2 --help
which prints the options details.I am wondering if it is possible to print that options details as a part of the default help output, or something similar to that:
The text was updated successfully, but these errors were encountered: