diff --git a/Cargo.lock b/Cargo.lock index 08da90d..eaad991 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -63,6 +63,7 @@ version = "0.4.40" dependencies = [ "cargo-subcommand-metadata", "clap", + "clap-cargo", "regex-lite", "rustc-demangle", "shlex", @@ -92,6 +93,16 @@ dependencies = [ "clap_derive", ] +[[package]] +name = "clap-cargo" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23b2ea69cefa96b848b73ad516ad1d59a195cdf9263087d977f648a818c8b43e" +dependencies = [ + "anstyle", + "clap", +] + [[package]] name = "clap_builder" version = "4.5.17" diff --git a/Cargo.toml b/Cargo.toml index 42ab784..d85168b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,6 +13,7 @@ repository = "https://github.com/dtolnay/cargo-llvm-lines" [dependencies] cargo-subcommand-metadata = "0.1" clap = { version = "4", features = ["deprecated", "derive", "wrap_help"] } +clap-cargo = "0.14" regex = { version = "0.1", package = "regex-lite" } rustc-demangle = "0.1" shlex = "1.3" diff --git a/src/opts.rs b/src/opts.rs index 4e45d27..316c6fd 100644 --- a/src/opts.rs +++ b/src/opts.rs @@ -32,7 +32,8 @@ const MANIFEST_OPTIONS: &str = "Manifest Options"; bin_name = "cargo", author, version, - disable_help_subcommand = true + disable_help_subcommand = true, + styles = clap_cargo::style::CLAP_STYLING, )] #[allow(dead_code)] pub enum Subcommand { @@ -50,6 +51,7 @@ pub enum Subcommand { } #[derive(Parser, Debug)] +#[command(styles = clap_cargo::style::CLAP_STYLING)] pub struct LlvmLines { /// Set column by which to sort output table. #[arg(