-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Subcommand name without hyphen in help #1431
Copy link
Copy link
Closed
Labels
A-helpArea: documentation, including docs.rs, readme, examples, etc...Area: documentation, including docs.rs, readme, examples, etc...C-enhancementCategory: Raise on the bar on expectationsCategory: Raise on the bar on expectationsS-blockedStatus: Blocked on something else such as an RFC or other implementation work.Status: Blocked on something else such as an RFC or other implementation work.
Metadata
Metadata
Assignees
Labels
A-helpArea: documentation, including docs.rs, readme, examples, etc...Area: documentation, including docs.rs, readme, examples, etc...C-enhancementCategory: Raise on the bar on expectationsCategory: Raise on the bar on expectationsS-blockedStatus: Blocked on something else such as an RFC or other implementation work.Status: Blocked on something else such as an RFC or other implementation work.
Maintainer's notes
Rust Version
Affected Version of clap
Bug or Feature Request Summary
Add a flag which supports printing the name of an app subcommand without the hyphen instead of with a hyphen, for apps which do not use external commands.
Expected Behavior Summary
Clap apps can output
app subcommandas the name of a subcommand when runningapp subcommand --help.Actual Behavior Summary
Clap apps can only output
app-subcommandas the name of a subcommand when runningapp subcommand --help.Steps to Reproduce the issue
App::new('app').subcommand(Subcommand::with_name('subcommand')).Sample Code or Link to Sample Code
notion is an app where we want subcommands to print like
notion installnotnotion-install.Debug output
Compile clap with cargo features
"debug"such as:Debug Output