Browse Source

Add colors to --help (#1633)

pull/1635/head
Filip Czaplicki 2 months ago committed by GitHub
parent
commit
87d4d5aa5d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 15
      Cargo.lock
  2. 1
      Cargo.toml
  3. 1
      src/cli.rs

15
Cargo.lock generated

@ -439,6 +439,16 @@ dependencies = [ @@ -439,6 +439,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.43"
@ -504,7 +514,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" @@ -504,7 +514,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "117725a109d387c937a1533ce01b450cbde6b88abceea8473c4d7a85853cda3c"
dependencies = [
"lazy_static",
"windows-sys 0.48.0",
"windows-sys 0.59.0",
]
[[package]]
@ -2706,6 +2716,7 @@ dependencies = [ @@ -2706,6 +2716,7 @@ dependencies = [
"askalono",
"byte-unit",
"clap",
"clap-cargo",
"clap_complete",
"criterion",
"crossbeam-channel",
@ -4238,7 +4249,7 @@ version = "0.1.9" @@ -4238,7 +4249,7 @@ version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb"
dependencies = [
"windows-sys 0.48.0",
"windows-sys 0.59.0",
]
[[package]]

1
Cargo.toml

@ -39,6 +39,7 @@ anyhow.workspace = true @@ -39,6 +39,7 @@ anyhow.workspace = true
askalono = "0.5.0"
byte-unit = "5.1.6"
clap.workspace = true
clap-cargo = "0.15.2"
clap_complete = "4.5.55"
crossbeam-channel = "0.5.15"
gix = { version = "0.73.0", default-features = false, features = [

1
src/cli.rs

@ -22,6 +22,7 @@ pub const NO_BOTS_DEFAULT_REGEX_PATTERN: &str = r"(?:-|\s)[Bb]ot$|\[[Bb]ot\]"; @@ -22,6 +22,7 @@ pub const NO_BOTS_DEFAULT_REGEX_PATTERN: &str = r"(?:-|\s)[Bb]ot$|\[[Bb]ot\]";
#[derive(Clone, Debug, Parser, PartialEq, Eq)]
#[command(version, about)]
#[command(styles = clap_cargo::style::CLAP_STYLING)]
pub struct CliOptions {
/// Run as if onefetch was started in <input> instead of the current working directory
#[arg(default_value = ".", hide_default_value = true, value_hint = ValueHint::DirPath)]

Loading…
Cancel
Save