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

ColoredHelp is overridden by subcommands #519

Closed
clux opened this issue Jun 3, 2016 · 3 comments
Closed

ColoredHelp is overridden by subcommands #519

clux opened this issue Jun 3, 2016 · 3 comments
Labels
A-help Area: documentation, including docs.rs, readme, examples, etc...
Milestone

Comments

@clux
Copy link

clux commented Jun 3, 2016

Currently .setting(AppSettings::ColoredHelp) has to be added to every subcommand even though it is set on the "global scope"

App::new("foo")
        .setting(AppSettings::ColoredHelp)
        .subcommand(SubCommand::with_name("bar"))
foo help # gives colored output
foo help bar # uncolored

It probably makes sense to inherit this value from parent, rather than adding it everywhere, right?

@kbknapp
Copy link
Member

kbknapp commented Jun 3, 2016

Thanks for filing this! Great point, I hadn't considered that. There are an increasing number of settings that one would intuitively think would be propagated down through child commands, but aren't.

I'm thinking of adding an App::global_setting(s) to do just that.

@kbknapp kbknapp added T: new feature A-help Area: documentation, including docs.rs, readme, examples, etc... labels Jun 3, 2016
@kbknapp
Copy link
Member

kbknapp commented Jun 4, 2016

#520 fixes this

@clux
Copy link
Author

clux commented Jun 4, 2016

Awesome, thank you!

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...
Projects
None yet
Development

No branches or pull requests

2 participants