From 28d0933d6c07c1a6224dfe40e0b00526e1dd920a Mon Sep 17 00:00:00 2001 From: ttyS3 Date: Tue, 3 Dec 2024 17:12:31 +0000 Subject: [PATCH] fix: change threads short flag to -c in cli args to avoid conflict with `tree` --- src/cli/args.rs | 2 +- tests/snapshots/ui__ui_test_usage_help_flag-2.snap | 2 ++ tests/snapshots/ui__ui_test_usage_help_flag.snap | 4 ++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/cli/args.rs b/src/cli/args.rs index 2dafe92..e6fd66d 100644 --- a/src/cli/args.rs +++ b/src/cli/args.rs @@ -46,7 +46,7 @@ pub struct CliArgs { pub password: Option, /// cocurrent working threads - #[arg(short = 't', long, global = true)] + #[arg(short = 'c', long, global = true)] pub threads: Option, // Ouch and claps subcommands diff --git a/tests/snapshots/ui__ui_test_usage_help_flag-2.snap b/tests/snapshots/ui__ui_test_usage_help_flag-2.snap index cb937d7..058d54e 100644 --- a/tests/snapshots/ui__ui_test_usage_help_flag-2.snap +++ b/tests/snapshots/ui__ui_test_usage_help_flag-2.snap @@ -1,6 +1,7 @@ --- source: tests/ui.rs expression: "output_to_string(ouch!(\"-h\"))" +snapshot_kind: text --- A command-line utility for easily compressing and decompressing files and directories. @@ -21,5 +22,6 @@ Options: -g, --gitignore Ignores files matched by git's ignore files -f, --format Specify the format of the archive -p, --password decompress or list with password + -c, --threads cocurrent working threads -h, --help Print help (see more with '--help') -V, --version Print version diff --git a/tests/snapshots/ui__ui_test_usage_help_flag.snap b/tests/snapshots/ui__ui_test_usage_help_flag.snap index 921aa8d..f8a2ad4 100644 --- a/tests/snapshots/ui__ui_test_usage_help_flag.snap +++ b/tests/snapshots/ui__ui_test_usage_help_flag.snap @@ -1,6 +1,7 @@ --- source: tests/ui.rs expression: "output_to_string(ouch!(\"--help\"))" +snapshot_kind: text --- A command-line utility for easily compressing and decompressing files and directories. @@ -43,6 +44,9 @@ Options: -p, --password decompress or list with password + -c, --threads + cocurrent working threads + -h, --help Print help (see a summary with '-h') -- 2.11.4.GIT