-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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 AppSettings to disable automatic "help" subcommand #787
Comments
Interesting, the fact that app.subcommand(SubCommand::with_name("help").setting(AppSettings::Hidden)) Isn't hiding the subcommand looks like a bug. I'll dig into this further, because that's the intended behavior, and I would prefer that to an Also, small note, the For instance, the following invocations are equivalent:
|
For the record, I'm also using What's also curious is that "help" subcommand is actually gone from the output of |
|
I have this fixed in a local branch and will upload shortly. You can now either do as you were, |
…ableHelpSubcommand`) Relates to #787
When using
SubCommand
s, clap will automatically include a "help" subcommand:This is redundant, as subcommand help can also be obtained via
$SUBCOMMAND --help
.Right now, it seems there is no way to hide that superfluous subcommand, as this doesn't work:
Consequently, the "help" subcommand may have to be handled explicitly.
Suggestion: introduce
AppSettings::NoHelpSubcommand
which, if set on the rootApp
, hides the "help" subcommand from usage output.The text was updated successfully, but these errors were encountered: