Skip to content

Commit

Permalink
Merge pull request uutils#6150 from BenWiederhake/dev-dircolors-repeated
Browse files Browse the repository at this point in the history
dircolors: accept repeated flags
  • Loading branch information
sylvestre committed Mar 31, 2024
2 parents 7be6e9a + 8e794d0 commit b869c67
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/uu/dircolors/src/dircolors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ pub fn uu_app() -> Command {
.about(ABOUT)
.after_help(AFTER_HELP)
.override_usage(format_usage(USAGE))
.args_override_self(true)
.infer_long_args(true)
.arg(
Arg::new(options::BOURNE_SHELL)
Expand Down
7 changes: 7 additions & 0 deletions tests/by-util/test_dircolors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -246,3 +246,10 @@ fn test_dircolors_for_dir_as_file() {
"dircolors: expected file, got directory '/'",
);
}

#[test]
fn test_repeated() {
for arg in ["-b", "-c", "--print-database", "--print-ls-colors"] {
new_ucmd!().arg(arg).arg(arg).succeeds().no_stderr();
}
}

0 comments on commit b869c67

Please sign in to comment.