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

HELP shows ARGS section with all args hidden #882

Closed
nagisa opened this issue Mar 1, 2017 · 1 comment
Closed

HELP shows ARGS section with all args hidden #882

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

Comments

@nagisa
Copy link

nagisa commented Mar 1, 2017

app.arg(Arg::with_name("dummy").possible_value("some val").required(false).hidden(true));

Results in

USAGE:
    app [dummy] [SUBCOMMAND]

FLAGS:
    ...

ARGS:
   { EMPTY }

SUBCOMMANDS:
   ...

Additional comments:

If possible_value is used, USAGE ought to display the possible value instead of arg name?

Rust Version

N/A

Affected Version of clap

2.20.5

@kbknapp
Copy link
Member

kbknapp commented Mar 1, 2017

Thanks for reporting, this 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 Mar 1, 2017
kbknapp added a commit that referenced this issue Mar 9, 2017
kbknapp pushed a commit that referenced this issue Mar 9, 2017
Also no need to check for Hidden inside for that already is filtered
on !Hidden.

Closes #882
kbknapp added a commit that referenced this issue Mar 9, 2017
kbknapp added a commit that referenced this issue Mar 10, 2017
@homu homu closed this as completed in 8adf353 Mar 11, 2017
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