diff --git a/src/uu/cat/src/cat.rs b/src/uu/cat/src/cat.rs index d793fc368ec..b22e19b6384 100644 --- a/src/uu/cat/src/cat.rs +++ b/src/uu/cat/src/cat.rs @@ -251,7 +251,8 @@ pub fn uu_app() -> Command { .short('b') .long(options::NUMBER_NONBLANK) .help("number nonempty output lines, overrides -n") - .overrides_with(options::NUMBER) + // Note: This MUST NOT .overrides_with(options::NUMBER)! + // In clap, overriding is symmetric, so "-b -n" counts as "-n", which is not what we want. .action(ArgAction::SetTrue), ) .arg( diff --git a/tests/by-util/test_cat.rs b/tests/by-util/test_cat.rs index 4956114bdb0..1fd829ed90c 100644 --- a/tests/by-util/test_cat.rs +++ b/tests/by-util/test_cat.rs @@ -438,7 +438,6 @@ fn test_non_blank_overrides_number() { } #[test] -#[ignore = "known issue"] fn test_non_blank_overrides_number_even_when_present() { new_ucmd!() .args(&["-n", "-b", "-n"])