Skip to content
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

Usage line for subcommands should include bin_name prefix #539

Closed
joshtriplett opened this issue Jun 23, 2016 · 4 comments
Closed

Usage line for subcommands should include bin_name prefix #539

joshtriplett opened this issue Jun 23, 2016 · 4 comments
Labels
A-help Area: documentation, including docs.rs, readme, examples, etc... C-bug Category: Updating dependencies

Comments

@joshtriplett
Copy link
Contributor

When showing the usage for a subcommand, clap only shows the subcommand name, not the command name before it. For instance, given a command command, and a subcommand sub, command help sub will show:

sub
Subcommand about string goes here.

USAGE:
    sub [FLAGS] <arg>...

This should look like:

command sub
Subcommand about string goes here.

USAGE:
    command sub [FLAGS] <arg>...
@kbknapp
Copy link
Member

kbknapp commented Jun 24, 2016

This is also a bug, and I'm curious where this regressed. I should look like:

command-sub
Subcommand about string goes here.

USAGE:
    command sub [FLAGS] <arg>...

@kbknapp kbknapp added C-bug Category: Updating dependencies P2: need to have A-help Area: documentation, including docs.rs, readme, examples, etc... labels Jun 24, 2016
@joshtriplett
Copy link
Contributor Author

Why command-sub rather than command sub?

@kbknapp
Copy link
Member

kbknapp commented Jun 24, 2016

I think originally I modeled it after git where all subcommands in manpages have a hyphen separating commands.

@kbknapp
Copy link
Member

kbknapp commented Jun 24, 2016

I have a local branch with this fixed. I'm going to roll it up with a few of the other issues and push the PR.

@homu homu closed this as completed in 08ad1cf Jun 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-help Area: documentation, including docs.rs, readme, examples, etc... C-bug Category: Updating dependencies
Projects
None yet
Development

No branches or pull requests

2 participants