Skip to content

Commit

Permalink
Merge pull request #239 from dtolnay/styles
Browse files Browse the repository at this point in the history
Use cargo styles for help text
  • Loading branch information
dtolnay authored Oct 31, 2024
2 parents a6e1d74 + 6b18112 commit 5f8061f
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
11 changes: 11 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ prettyplease = []
bat = { version = "0.24", default-features = false, features = ["paging", "regex-fancy"] }
cargo-subcommand-metadata = "0.1"
clap = { version = "4", features = ["deprecated", "derive"] }
clap-cargo = "0.14"
console = "0.15"
etcetera = "0.8"
fs-err = "3"
Expand Down
8 changes: 7 additions & 1 deletion src/opts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,13 @@ const COMPILATION_OPTIONS: &str = "Compilation Options";
const MANIFEST_OPTIONS: &str = "Manifest Options";

#[derive(Parser)]
#[command(bin_name = "cargo", version, author, disable_help_subcommand = true)]
#[command(
bin_name = "cargo",
version,
author,
disable_help_subcommand = true,
styles = clap_cargo::style::CLAP_STYLING,
)]
pub enum Subcommand {
/// Show the result of macro expansion.
#[command(name = "expand", version, author, disable_version_flag = true)]
Expand Down

0 comments on commit 5f8061f

Please sign in to comment.