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

fix: Don't print 'OPTIONS' when all options are hidden for short help #1832

Merged
merged 1 commit into from
Apr 16, 2020

Conversation

thedadams
Copy link
Contributor

Don't print the 'OPTIONS' section of the short help message when all option-taking arguments are set with .hidden_short_help(true).

Closes #1364

@pksunkara
Copy link
Member

We recently refactored this part of the code. You will have to wait for #1824 to be merged into master (should be soon) and then rebase on top of master. Really appreciate the contribution though.

@pksunkara
Copy link
Member

No issues with the code. I should be able to merge it once you rebase. 😄

@thedadams
Copy link
Contributor Author

thedadams commented Apr 16, 2020

Awesome! I've subscribed to the other PR so I am alerted when it is merged.

I am also happy to fix the linting issues related to my code: opts.len() > 0 => !opts.is_empty()

EDIT: Oops, I just saw that the other PR was already merged.

@pksunkara
Copy link
Member

Yes please fix the lint, otherwise the CI will fail.

Copy link
Member

@pksunkara pksunkara left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bors r+

@bors
Copy link
Contributor

bors bot commented Apr 16, 2020

Build succeeded:

@bors bors bot merged commit e1d83a7 into clap-rs:master Apr 16, 2020
@thedadams thedadams deleted the bugfix/1364 branch April 17, 2020 04:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Empty OPTIONS in -h if all options exist but all are hidden_short_help
2 participants