-
Notifications
You must be signed in to change notification settings - Fork 55
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 colored help #30
Add colored help #30
Conversation
Hey @DrSensor, thanks for the PR! I completely missed this... didn't get an email/notification from github. I actually have been running with edit: not sure why github CI tests didn't pass 🤔 |
src/main.rs
Outdated
AppSettings::ColoredHelp | ||
} else { | ||
AppSettings::ColorNever // in case it run on terminal without color support | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my testing a few weeks ago, i thought the ColoredHelp
setting was inherited from the root cli_app
? We actually need to do this here too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately yes. Seems like most of AppSettings::*
in clap doesn't propagate to Subcommands (or in another word, it doesn't applied to nested App
). Probably it propagate to Subcommands only if the setting prefixed with *Subcommands
(e.g VersionlessSubcommands
) 🤔
@jakedeichert, when I view it in desktop browser, it got stalled till now 🤔 |
Cargo.toml
Outdated
colored = "1.8.0" # https://github.com/mackwic/colored | ||
pulldown-cmark = { version = "0.5", default-features = false } # https://github.com/raphlinus/pulldown-cmark | ||
|
||
[dependencies.clap] # https://github.com/clap-rs/clap | ||
version = "2.33.0" | ||
features = ["wrap_help", "color"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we remove "color" here? It's a default feature so we don't need to specify it :)
features = ["wrap_help", "color"] | |
features = ["wrap_help"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done 702afad 😋
Hey! I left 1 more comment. I tried the PR locally and i'm happy with it... wrap_help is nice too. After you fix the 1 line, i'll merge and release to cargo 👍 |
Co-Authored-By: Jake Deichert <[email protected]>
Types of changes
Just want to make it eye catchy 😋