mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-27 19:17:43 +00:00
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.
This commit is contained in:
parent
4b7e122adc
commit
2a61fc7f72
1 changed files with 5 additions and 1 deletions
|
@ -63,7 +63,7 @@ pub fn uumain(args: Vec<String>) -> i32 {
|
||||||
.short("s")
|
.short("s")
|
||||||
.long(OPT_KERNELNAME)
|
.long(OPT_KERNELNAME)
|
||||||
.alias("sysname") // Obsolescent option in GNU uname
|
.alias("sysname") // Obsolescent option in GNU uname
|
||||||
.help("print the operating system name."))
|
.help("print the kernel name."))
|
||||||
.arg(Arg::with_name(OPT_NODENAME)
|
.arg(Arg::with_name(OPT_NODENAME)
|
||||||
.short("n")
|
.short("n")
|
||||||
.long(OPT_NODENAME)
|
.long(OPT_NODENAME)
|
||||||
|
@ -91,6 +91,10 @@ pub fn uumain(args: Vec<String>) -> i32 {
|
||||||
.short("m")
|
.short("m")
|
||||||
.long(OPT_MACHINE)
|
.long(OPT_MACHINE)
|
||||||
.help("print the machine hardware name."))
|
.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);
|
.get_matches_from(&args);
|
||||||
|
|
||||||
let argc = args.len();
|
let argc = args.len();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue