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

Add a App::unset_setting or App::unset_settings fn #590

Closed
brennie opened this issue Jul 23, 2016 · 2 comments
Closed

Add a App::unset_setting or App::unset_settings fn #590

brennie opened this issue Jul 23, 2016 · 2 comments
Labels
A-builder Area: Builder API C-enhancement Category: Raise on the bar on expectations E-medium Call for participation: Experience needed to fix: Medium / intermediate

Comments

@brennie
Copy link

brennie commented Jul 23, 2016

Currently if you would like to disable a setting, you have to use undocumented interfaces to do so. I would prefer to not have the --help option and instead only use the help subcommand so I currently have to do:

let mut app = App::new("program")
    /* ... */;

app.p.unset(AppSettings::NeedsLongHelp);

It would be much more ideal to do:

let app = App::new("program")
    .unset_setting(AppSettings::NeedsLongHelp)
    /* ... */;
@kbknapp
Copy link
Member

kbknapp commented Jul 23, 2016

Good idea, thanks! 👍

I'll add this to the queue, and should a very easy addition if anyone would like to try out this as a first PR.

@kbknapp kbknapp added C-enhancement Category: Raise on the bar on expectations T: new feature A-builder Area: Builder API E-medium Call for participation: Experience needed to fix: Medium / intermediate labels Jul 23, 2016
@brennie
Copy link
Author

brennie commented Jul 24, 2016

I would be willing to take this on.

homu added a commit that referenced this issue Jul 24, 2016
feat(Settings): Add unset_setting and unset_settings fns to App

Closes #590.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-builder Area: Builder API 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

2 participants