From d7ebd27df26169f69ab72f14e354172c0f9f79df 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 42b9d1b7..a3b7232c 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 cb937d79..058d54ed 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 921aa8d0..f8a2ad42 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')