feat: disable colored output
This commit is contained in:
parent
6799f9a666
commit
d71920e00f
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -297,7 +297,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "grip-grab"
|
||||
version = "0.2.3"
|
||||
version = "0.2.5"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"clap",
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "grip-grab"
|
||||
version = "0.2.3"
|
||||
version = "0.2.5"
|
||||
edition = "2021"
|
||||
authors = ["Alexandre Pasmantier <alex.pasmant@gmail.com>"]
|
||||
license = "Apache-2.0"
|
||||
|
@ -55,8 +55,8 @@ Options:
|
||||
output file paths only
|
||||
-A, --absolute-paths
|
||||
output absolute paths (defaults to relative)
|
||||
-C, --colored-output
|
||||
toggle colored output (defaults to ON)
|
||||
-C, --disable-colored-output
|
||||
disable colored output (colored by default)
|
||||
-t, --filter-filetypes <FILTER_FILETYPES>
|
||||
filter on filetype (defaults to all filetypes)
|
||||
-h, --help
|
||||
|
@ -57,9 +57,9 @@ pub struct Cli {
|
||||
#[clap(short = 'A', long, default_value_t = false)]
|
||||
pub absolute_paths: bool,
|
||||
|
||||
/// toggle colored output (defaults to ON)
|
||||
#[clap(short = 'C', long, default_value_t = true)]
|
||||
pub colored_output: bool,
|
||||
/// disable colored output (colored by default)
|
||||
#[clap(short = 'C', long, default_value_t = false)]
|
||||
pub disable_colored_output: bool,
|
||||
|
||||
/// filter on filetype (defaults to all filetypes)
|
||||
#[clap(short = 't', long)]
|
||||
@ -102,7 +102,7 @@ pub fn process_cli_args(cli: Cli) -> anyhow::Result<PostProcessedCli> {
|
||||
PrintMode::Text
|
||||
},
|
||||
absolute_paths: cli.absolute_paths,
|
||||
colored_output: cli.colored_output,
|
||||
colored_output: !cli.disable_colored_output,
|
||||
filter_filetypes: cli.filter_filetypes,
|
||||
})
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user