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

Positional Args with Value Names prints Arg Name #420

Closed
kbknapp opened this issue Feb 8, 2016 · 0 comments
Closed

Positional Args with Value Names prints Arg Name #420

kbknapp opened this issue Feb 8, 2016 · 0 comments
Labels
A-help Area: documentation, including docs.rs, readme, examples, etc... C-enhancement Category: Raise on the bar on expectations E-medium Call for participation: Experience needed to fix: Medium / intermediate

Comments

@kbknapp
Copy link
Member

kbknapp commented Feb 8, 2016

extern crate clap;

use clap::{App, Arg};

fn main() {
    let m = App::new("valnames")
        .arg(Arg::with_name("arg")
            .required(true)
            .value_name("FILE"))
        .get_matches();
}

Help prints:

$ valnames --help
valnames 

USAGE:
    valnames [FLAGS] [ARGS] <arg>

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

ARGS:
    arg    

Note arg

@kbknapp kbknapp added C-enhancement Category: Raise on the bar on expectations C: args A-help Area: documentation, including docs.rs, readme, examples, etc... E-medium Call for participation: Experience needed to fix: Medium / intermediate labels Feb 8, 2016
kbknapp added a commit that referenced this issue Feb 9, 2016
When value names are use, they will be displayed in help and error
messages instead of the argument name. For example, an argument named
`arg` but with the value name `FILE` will be displayed as `[FILE]`.
Likewise multiple value names will be displayed properly such as `[FILE1] [FILE2]`

Closes #420
@kbknapp kbknapp mentioned this issue Feb 9, 2016
homu added a commit that referenced this issue Feb 9, 2016
Issue 420

When value names are use, they will be displayed in help and error
messages instead of the argument name. For example, an argument named
`arg` but with the value name `FILE` will be displayed as `[FILE]`.
Likewise multiple value names will be displayed properly such as `[FILE1] [FILE2]`

Closes #420
homu added a commit that referenced this issue Feb 9, 2016
Issue 420

When value names are use, they will be displayed in help and error
messages instead of the argument name. For example, an argument named
`arg` but with the value name `FILE` will be displayed as `[FILE]`.
Likewise multiple value names will be displayed properly such as `[FILE1] [FILE2]`

Closes #420
@homu homu closed this as completed in #422 Feb 9, 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-enhancement Category: Raise on the bar on expectations E-medium Call for participation: Experience needed to fix: Medium / intermediate
Projects
None yet
Development

No branches or pull requests

1 participant