From bbce74666682aa26f62fe0cc980b196257f846fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Marcos?= Date: Tue, 15 Jul 2025 17:01:59 -0300 Subject: [PATCH] Add aliases for password flag (#847) --- CHANGELOG.md | 1 + src/cli/args.rs | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3062d1f..f4b20ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,7 @@ Categories Used: ### Improvements - Give better error messages when archive extensions are invalid [\#817](https://github.com/ouch-org/ouch/pull/817) ([marcospb19](https://github.com/marcospb19)) +- Add aliases for `--password` flag (`--pass` and `--pw`) [\#847](https://github.com/ouch-org/ouch/pull/847) ([marcospb19](https://github.com/marcospb19)) ### Bug Fixes diff --git a/src/cli/args.rs b/src/cli/args.rs index b756df5..105f004 100644 --- a/src/cli/args.rs +++ b/src/cli/args.rs @@ -30,11 +30,11 @@ pub struct CliArgs { pub hidden: bool, /// Silence output - #[arg(short = 'q', long, global = true)] + #[arg(short, long, global = true)] pub quiet: bool, /// Ignore files matched by git's ignore files - #[arg(short = 'g', long, global = true)] + #[arg(short, long, global = true)] pub gitignore: bool, /// Specify the format of the archive @@ -42,7 +42,7 @@ pub struct CliArgs { pub format: Option, /// Decompress or list with password - #[arg(short = 'p', long = "password", global = true)] + #[arg(short, long = "password", aliases = ["pass", "pw"], global = true)] pub password: Option, /// Concurrent working threads