diff --git a/Cargo.lock b/Cargo.lock index 86d1a67e..85220c5b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -393,6 +393,16 @@ dependencies = [ "clap_derive", ] +[[package]] +name = "clap-cargo" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d546f0e84ff2bfa4da1ce9b54be42285767ba39c688572ca32412a09a73851e5" +dependencies = [ + "anstyle", + "clap", +] + [[package]] name = "clap_builder" version = "4.5.53" @@ -2969,6 +2979,7 @@ dependencies = [ "base64ct", "chrono", "clap", + "clap-cargo", "clap_complete", "clap_mangen", "color-eyre", diff --git a/Cargo.toml b/Cargo.toml index 82869a59..529108ed 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -51,6 +51,7 @@ serde_json = "1.0.145" ignore = "=0.4.23" globset = "=0.4.16" base64ct = "<1.8.0" +clap-cargo = "0.15.2" [patch.crates-io] mac-notification-sys = { git = "https://github.com/h4llow3En/mac-notification-sys" } diff --git a/src/config.rs b/src/config.rs index 7e00813b..87ad0668 100644 --- a/src/config.rs +++ b/src/config.rs @@ -729,7 +729,7 @@ impl ConfigFile { // TODO: i18n of clap currently not easily possible. Waiting for https://github.com/clap-rs/clap/issues/380 // Tracking issue for i18n: https://github.com/topgrade-rs/topgrade/issues/859 #[derive(Parser, Debug)] -#[command(name = "topgrade", version)] +#[command(name = "topgrade", version, styles = clap_cargo::style::CLAP_STYLING)] pub struct CommandLineArgs { /// Edit the configuration file #[arg(long = "edit-config")]