Add a ShowSubcommandHelpAndExit() #1112
Labels
area/v2
relates to / is being considered for v2
kind/feature
describes a code enhancement / feature request
status/triage
maintainers still need to look into this
Checklist
What problem does this solve?
There is a
ShowAppHelpAndExit()
and aShowCommandHelpAndExit()
but there's currently noShowSubcommandHelpAndExit()
.Solution description
I usually use at the top of my command actions something like this:
So if someone doesn't supply the correct number of positional arguments they get the help and it exits with a non-zero code.
I tried to use sub-commands for the first time and found I can't do this.
Describe alternatives you've considered
I've tried implementing as:
but that doesn't work very well.
The text was updated successfully, but these errors were encountered: