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

-h overridable in subcommand but --help is not #1112

Closed
frewsxcv opened this issue Nov 20, 2017 · 1 comment
Closed

-h overridable in subcommand but --help is not #1112

frewsxcv opened this issue Nov 20, 2017 · 1 comment
Labels
A-help Area: documentation, including docs.rs, readme, examples, etc... C-bug Category: Updating dependencies

Comments

@frewsxcv
Copy link
Contributor

Rust Version

rustc 1.23.0-nightly (a35a3abcd 2017-11-10)

Affected Version of clap

2.27.1

Expected Behavior Summary

> target/debug/foo bar -h
> target/debug/foo bar --help
>

Actual Behavior Summary

> target/debug/foo bar -h
> target/debug/foo bar --help
foo-bar 

USAGE:
    foo bar [FLAGS]

FLAGS:
    -h               
        --help       
    -V, --version    Prints version information
>

Sample Code or Link to Sample Code

extern crate clap;

fn main() {
    let _ = clap::App::new("foo")
        .subcommand(
            clap::SubCommand::with_name("bar")
                .arg(clap::Arg::with_name("help1").short("h"))
                .arg(clap::Arg::with_name("help2").long("help"))
        )
        .get_matches();
}

Debug output

gist

@kbknapp
Copy link
Member

kbknapp commented Nov 22, 2017

Thanks for filing this, it should be an easy fix!

@kbknapp kbknapp added A-help Area: documentation, including docs.rs, readme, examples, etc... D: easy C-bug Category: Updating dependencies labels Nov 22, 2017
@kbknapp kbknapp mentioned this issue Nov 25, 2017
87 tasks
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