-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
The header for my examples are not colored like the others #3108
Comments
What's the reason behind categorising this as bug? I would think this would be more of an enhancement, right? |
Sometimes, its an arbitrary distinction. From a users perspective, its a bug in the application |
#1433 has a similar use case for help templates and has a different proposed solution. |
#2389 might be the path to us exposing some formatting control. |
Yet another way to solve this relatively painlessly is to allow calling |
My plan is for the API to accept ANSI colored strings. When we output, we use a special stdout/stderr that adapt the ANSI color codes to the capabilities of the terminal. Blocked on https://github.com/epage/anstyle/issues/5 |
This upgrade removes the colorization of the output of the `--help` command. We will track clap-rs/clap#3108 to restore it in the future.
This upgrade removes the colorization of the output of the `--help` command. We will track clap-rs/clap#3108 to restore it in the future.
This upgrade removes the colorization of the output of the `--help` command. We will track clap-rs/clap#3108 to restore it in the future.
Please complete the following tasks
Rust Version
rustc 1.55.0 (c8dfcfe04 2021-09-06)
Clap Version
v3.0.0-rc.0
Minimal reproducible code
Steps to reproduce the bug with the above code
cargo run -- --help
Actual Behaviour
Examples
isn't colored:Expected Behaviour
Examples
is coloredAdditional Context
Inspired by help2man in #3096.
Including example commands is a really useful pattern and now that we color by default, doing this stands out.
Something like #1790 could help. Alternatively, we could have
after_help
take a section name, maybe as anOption
. Like withoverride_usage
, we'd probably want the indentation to be user-defined.Debug Output
No response
The text was updated successfully, but these errors were encountered: