From 9fe49bf1bcbbe5a2a7dabf9127971e24d8b707c0 Mon Sep 17 00:00:00 2001 From: E5ten Date: Thu, 1 Aug 2019 05:00:39 -0400 Subject: [PATCH] feature(uname): Add -o/--operating-system flag The code for the flag already existed it had just not been added to the argument parsing. Replace "print the operating system name." in -s help text with "print the kernel name." so the -o option can use the previous -s help text. --- src/uu/uname/src/uname.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/uu/uname/src/uname.rs b/src/uu/uname/src/uname.rs index 7adc1b4e9..007d54d49 100644 --- a/src/uu/uname/src/uname.rs +++ b/src/uu/uname/src/uname.rs @@ -63,7 +63,7 @@ pub fn uumain(args: Vec) -> i32 { .short("s") .long(OPT_KERNELNAME) .alias("sysname") // Obsolescent option in GNU uname - .help("print the operating system name.")) + .help("print the kernel name.")) .arg(Arg::with_name(OPT_NODENAME) .short("n") .long(OPT_NODENAME) @@ -91,6 +91,10 @@ pub fn uumain(args: Vec) -> i32 { .short("m") .long(OPT_MACHINE) .help("print the machine hardware name.")) + .arg(Arg::with_name(OPT_OS) + .short("o") + .long(OPT_OS) + .help("print the operating system name.")) .get_matches_from(&args); let argc = args.len();