Calling --help on a subcommand does not work
Using the tutorial as an example: calling the app with read --help throws a stack overflow exception.
It looks like it's calling validation on arguments regardless of whether help was invoked or not when DefaultValueFactory is set.
Package version: [email protected]
This is close to #2707 (which probably shouldn't be closed), but there is no similar recourse in this situation that I can tell. One is not using class configuration, nor is overriding help or version options.
Many CLI's tend to use a help subcommand. For example: myapp help <subcommand> to get help for sub-commands, whereas myapp --help would give general, "top-level" help about myapp. Programs that do this, for example, are git, ip, and even kubernetes.
Many CLI's tend to use a
helpsubcommand. For example:myapp help <subcommand>to get help for sub-commands, whereasmyapp --helpwould give general, "top-level" help aboutmyapp. Programs that do this, for example, aregit,ip, and evenkubernetes.
git status --help kubectl get --help
@hammypants request seems legitimate
We did this in the dotnet CLI so that we could treat dotnet help <args> specially and open online detailed help for the specific command, if folks want to take inspiration from that.
Many CLI's tend to use a
helpsubcommand. For example:myapp help <subcommand>to get help for sub-commands, whereasmyapp --helpwould give general, "top-level" help aboutmyapp. Programs that do this, for example, aregit,ip, and evenkubernetes.
I'm aware. But their tutorial states it should work the way @danvy has listed it. In the subcommands and options section: