-
-
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
Help text for subcommand options #905
Comments
To see the options for the subcommand:
You can also install a Custom help listener for the subcommand to supply additional information about the subcommand to display when its help is requested. |
Ah, thanks, would be good to get this documented. Also is there a way to programmatically trigger it? Thinking of a subcommand like:
Would be useful for people familiar with git's help system. |
Looks like this is already stubbed but doesn't seem to do anything: Lines 210 to 212 in 82d0d0a
|
The current behaviour is when using a git-style (sub)command, these two are equivalent, and call the (sub)command with --help to display its help:
|
I'm running into this as well. Not sure what the correct approach is. My structure looks like this: So, from what I can tell, there's no way to get what the [options] are from top level help. These combinations fail:
This works: Perhaps this could all be solved by some sort of recursive help option? I.e. optionally navigate all sub commands recursively and aggregate their helps? It's not a great user interface for the user to have to guess that specific command in order to see the options for the sub-sub-command help. My expectation, as a user, would be that when I do: |
Interesting example of |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
For original poster, there are related changes in the published pre-release of Commander v5.0.0 (#1163)
|
Commander v5.0.0 has been released with improvements to the help command, and to the README. |
Opened poll on possible enhancements to global options: #1551 |
A subcommand can have options with descriptions defined but I can't see how to make them show up in the help text. It just shows:
subcommand [options]
Is it possible to expand this just as the global options are at the top of the help text?
The text was updated successfully, but these errors were encountered: