From a85adf3c3fff1a74e656e5f5f9bd530451e4d189 Mon Sep 17 00:00:00 2001 From: Andreas Hartmann Date: Wed, 23 Jun 2021 16:18:41 +0200 Subject: [PATCH] install: Internally rename short '-b' option Rename from OPT_BACKUP_2 to a more descriptive name "OPT_BACKUP_NO_ARGS". --- src/uu/install/src/install.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/uu/install/src/install.rs b/src/uu/install/src/install.rs index 44c1ca980..0f0be1959 100644 --- a/src/uu/install/src/install.rs +++ b/src/uu/install/src/install.rs @@ -68,7 +68,7 @@ static ABOUT: &str = "Copy SOURCE to DEST or multiple SOURCE(s) to the existing static OPT_COMPARE: &str = "compare"; static OPT_BACKUP: &str = "backup"; -static OPT_BACKUP_2: &str = "backup2"; +static OPT_BACKUP_NO_ARG: &str = "backup2"; static OPT_DIRECTORY: &str = "directory"; static OPT_IGNORED: &str = "ignored"; static OPT_CREATE_LEADING: &str = "create-leading"; @@ -113,7 +113,7 @@ pub fn uumain(args: impl uucore::Args) -> i32 { ) .arg( // TODO implement flag - Arg::with_name(OPT_BACKUP_2) + Arg::with_name(OPT_BACKUP_NO_ARG) .short("b") .help("(unimplemented) like --backup but does not accept an argument") ) @@ -270,6 +270,7 @@ fn check_unimplemented<'a>(matches: &ArgMatches) -> Result<(), &'a str> { Err("--backup") } else if matches.is_present(OPT_BACKUP_2) { Err("-b") + } else if matches.is_present(OPT_BACKUP_NO_ARG) { } else if matches.is_present(OPT_SUFFIX) { Err("--suffix, -S") } else if matches.is_present(OPT_NO_TARGET_DIRECTORY) {