Clap: Enable colored error messages

This commit is contained in:
Danilo Bargen 2021-12-11 17:40:16 +01:00
commit 876f390ac6
3 changed files with 4 additions and 1 deletions

2
Cargo.lock generated
View file

@ -134,12 +134,14 @@ version = "3.0.0-rc.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "967965e82fc46fee1a88147a7a977a66d615ed5f83eb95b18577b342c08f90ff"
dependencies = [
"atty",
"bitflags",
"clap_derive",
"indexmap",
"lazy_static",
"os_str_bytes",
"strsim 0.10.0",
"termcolor",
"textwrap",
]

View file

@ -22,7 +22,7 @@ path = "src/main.rs"
ansi_term = "0.12.0"
app_dirs = { version = "2", package = "app_dirs2" }
atty = "0.2"
clap = { version = "3.0.0-rc.4", features = ["std", "derive", "suggestions" ], default-features = false }
clap = { version = "3.0.0-rc.4", features = ["std", "derive", "suggestions", "color"], default-features = false }
env_logger = { version = "0.9", optional = true }
log = "0.4"
reqwest = { version = "0.11.3", features = ["blocking", "rustls-tls", "rustls-tls-native-roots"], default-features = false }

View file

@ -57,6 +57,7 @@ const ARCHIVE_URL: &str = "https://tldr.sh/assets/tldr.zip";
#[clap(about = "A fast TLDR client", author, version)]
#[clap(setting = AppSettings::ArgRequiredElseHelp)]
#[clap(setting = AppSettings::DeriveDisplayOrder)]
#[clap(setting = AppSettings::DisableColoredHelp)]
#[clap(
after_help = "To view the user documentation, please visit https://dbrgn.github.io/tealdeer/."
)]