-
-
Notifications
You must be signed in to change notification settings - Fork 102
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
add FailSubcommand, WriteUsageForSubcommand, WriteHelpForSubcommand #156
Conversation
Codecov Report
@@ Coverage Diff @@
## master #156 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 5 5
Lines 650 679 +29
=========================================
+ Hits 650 679 +29
Continue to review full report at Codecov.
|
Thanks for this. Is there a way to enable printing help messages by default for nested subcommands? As I understand it, even with this pull request merged I would still have to call Parser.WriteHelpForSubcommand in each problematic subcommands code. |
Why isn't this merged yet? It doesn't seem to be blocking on anything. |
@alexflint could we merge this? |
Hello @alexflint, thanks a lot for your work on this! It does look like #139 is not completely fixed yet though: we are still printing I am experimenting on this branch, but I'd love your input. Do you have any opinion on how that should be implemented? |
Closes #134 #135 #139
This pr makes it possible to print usage and help text for explicit subcommands. It adds three new functions:
These behave like their non-subcommand cousins, except that they also take a subcommand name (or a sequence of subcommand names in the case of nested subcommands)