Subcommands help header displayed with no visible subcommands #1046
Labels
A-help
Area: documentation, including docs.rs, readme, examples, etc...
C-enhancement
Category: Raise on the bar on expectations
Rust Version
rustc 1.22.0-nightly (ddd123ed9 2017-09-09)
Affected Version of clap
2.26.1
Expected Behavior Summary
If there are no visible subcommands, the
SUBCOMMANDS
section in help output should not be displayed. Similarly, thehelp
subcommand should not need to be hidden if there are no visible subcommands.Actual Behavior Summary
The
SUBCOMMANDS
section is always displayed when any subcommands are defined (even if they haveAppSettings::Hidden
). Thehelp
subcommand is not automatically hidden if there are no other visible subcommands.Steps to Reproduce the issue
Create an
App
with a subcommand that has been hidden usingAppSettings::Hidden
. Hide thehelp
subcommand withAppSettings::DisableHelpSubcommand
.Sample Code or Link to Sample Code
Debug output
Compile clap with cargo features
"debug"
such as:The text was updated successfully, but these errors were encountered: