You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
use clap::{App,AppSettings};fnmain(){let _matches = App::new("myapp").global_setting(AppSettings::DisableColoredHelp).subcommand(App::new("foo")).get_matches();}
Steps to reproduce the bug with the above code
cargo run -- help help
Actual Behaviour
The help output is colored.
versus other help output:
Expected Behaviour
The help output should not be colored due to DisableColoredHelp.
Additional Context
The priority of this is the lowest of the low. Just noticed it and thought I'd report it.
Looks like we propagate the global settings before creating the help subcommand`. The main question I have is whether its safe to swap the order (if the help and version logic needs some of the work being done in the previous step). I'll probably make a more immediate change of propagating settings just for the help subcommand.
epage
added a commit
to epage/clap
that referenced
this issue
Jan 17, 2022
We might be able to handle version/help before propagation but I didn't
want to hold up this fix for that to happen and increase the risk
associated with this fix.
Fixesclap-rs#3298
Please complete the following tasks
Rust Version
rustc 1.60.0-nightly (ec4bcaac4 2022-01-15)
Clap Version
3.0.7
Minimal reproducible code
Steps to reproduce the bug with the above code
cargo run -- help help
Actual Behaviour
The help output is colored.
versus other help output:
Expected Behaviour
The help output should not be colored due to
DisableColoredHelp
.Additional Context
The priority of this is the lowest of the low. Just noticed it and thought I'd report it.
Debug Output
The text was updated successfully, but these errors were encountered: