Skip to content

Commit

Permalink
dircolors: accept repeated flags
Browse files Browse the repository at this point in the history
  • Loading branch information
BenWiederhake authored and sylvestre committed Mar 30, 2024
1 parent c99e1c6 commit 8e794d0
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 8e794d0

Please sign in to comment.