From 3a0aaabd278edc205cea533478914595f982d2a4 Mon Sep 17 00:00:00 2001 From: Daniel Hofstetter Date: Thu, 26 May 2022 15:17:20 +0200 Subject: [PATCH 1/3] tail: fix typo --- src/uu/tail/src/tail.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/uu/tail/src/tail.rs b/src/uu/tail/src/tail.rs index 8f5a62e61..19986ef9e 100644 --- a/src/uu/tail/src/tail.rs +++ b/src/uu/tail/src/tail.rs @@ -326,7 +326,7 @@ pub fn uu_app<'a>() -> Command<'a> { .short('s') .takes_value(true) .long(options::SLEEP_INT) - .help("Number or seconds to sleep between polling the file when running with -f"), + .help("Number of seconds to sleep between polling the file when running with -f"), ) .arg( Arg::new(options::verbosity::VERBOSE) From 598fdc4430a1be01d9ccdaa94d43ff0069be3570 Mon Sep 17 00:00:00 2001 From: Daniel Hofstetter Date: Fri, 27 May 2022 10:24:37 +0200 Subject: [PATCH 2/3] dircolors: make -b & -c args overridable --- src/uu/dircolors/src/dircolors.rs | 2 ++ tests/by-util/test_dircolors.rs | 14 ++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/src/uu/dircolors/src/dircolors.rs b/src/uu/dircolors/src/dircolors.rs index cc3a9baa6..2c31d727e 100644 --- a/src/uu/dircolors/src/dircolors.rs +++ b/src/uu/dircolors/src/dircolors.rs @@ -166,6 +166,7 @@ pub fn uu_app<'a>() -> Command<'a> { .long("sh") .short('b') .visible_alias("bourne-shell") + .overrides_with(options::C_SHELL) .help("output Bourne shell code to set LS_COLORS") .display_order(1), ) @@ -174,6 +175,7 @@ pub fn uu_app<'a>() -> Command<'a> { .long("csh") .short('c') .visible_alias("c-shell") + .overrides_with(options::BOURNE_SHELL) .help("output C shell code to set LS_COLORS") .display_order(2), ) diff --git a/tests/by-util/test_dircolors.rs b/tests/by-util/test_dircolors.rs index edbc83bbb..bb64fd1e5 100644 --- a/tests/by-util/test_dircolors.rs +++ b/tests/by-util/test_dircolors.rs @@ -1,3 +1,4 @@ +// spell-checker:ignore overridable use crate::common::util::*; extern crate dircolors; @@ -78,6 +79,19 @@ fn test_csh_default() { .run() .stdout_is_fixture("csh_def.expected"); } +#[test] +fn test_overridable_args() { + new_ucmd!() + .env("TERM", "screen") + .arg("-bc") + .run() + .stdout_is_fixture("csh_def.expected"); + new_ucmd!() + .env("TERM", "screen") + .arg("-cb") + .run() + .stdout_is_fixture("bash_def.expected"); +} #[test] fn test_no_env() { From e750a5a06afc85588add3c92cb644ef2be577007 Mon Sep 17 00:00:00 2001 From: Daniel Hofstetter Date: Fri, 27 May 2022 10:52:51 +0200 Subject: [PATCH 3/3] dirname: add missing "\n\" to usage message --- src/uu/dirname/src/dirname.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/uu/dirname/src/dirname.rs b/src/uu/dirname/src/dirname.rs index ac37e513b..d2620315f 100644 --- a/src/uu/dirname/src/dirname.rs +++ b/src/uu/dirname/src/dirname.rs @@ -21,7 +21,7 @@ mod options { fn get_long_usage() -> String { String::from( - "Output each NAME with its last non-slash component and trailing slashes + "Output each NAME with its last non-slash component and trailing slashes \n\ removed; if NAME contains no /'s, output '.' (meaning the current directory).", ) }