From 876f390ac6dcd19ff2839465b33244cae1c7c03a Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sat, 11 Dec 2021 17:40:16 +0100 Subject: [PATCH] Clap: Enable colored error messages --- Cargo.lock | 2 ++ Cargo.toml | 2 +- src/main.rs | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index cd7b9d4..c937fc5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -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", ] diff --git a/Cargo.toml b/Cargo.toml index 805e743..5caf131 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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 } diff --git a/src/main.rs b/src/main.rs index 6a80017..4ee6d2d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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/." )]