Skip to content

Subcommand name without hyphen in help #1431

@chriskrycho

Description

@chriskrycho

Maintainer's notes


Rust Version

  • rustc 1.33.0 (2aa4c46cf 2019-02-28)

Affected Version of clap

  • clap 2.32.0

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 subcommand as the name of a subcommand when running app subcommand --help.

Actual Behavior Summary

Clap apps can only output app-subcommand as the name of a subcommand when running app subcommand --help.

Steps to Reproduce the issue

  1. App::new('app').subcommand(Subcommand::with_name('subcommand')).
  2. Run `

Sample Code or Link to Sample Code

notion is an app where we want subcommands to print like notion install not notion-install.

Debug output

Compile clap with cargo features "debug" such as:

[dependencies]
clap = { version = "2", features = ["debug"] }
Debug Output

Paste Debug Output Here

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-helpArea: documentation, including docs.rs, readme, examples, etc...C-enhancementCategory: Raise on the bar on expectationsS-blockedStatus: Blocked on something else such as an RFC or other implementation work.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions