diff --git a/src/uu/cat/src/cat.rs b/src/uu/cat/src/cat.rs index 7b8b69119..8823f27b8 100644 --- a/src/uu/cat/src/cat.rs +++ b/src/uu/cat/src/cat.rs @@ -250,7 +250,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 4956114bd..1fd829ed9 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"])