1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-27 19:17:43 +00:00

ls: enable "args override self"

This commit is contained in:
Daniel Hofstetter 2023-12-12 14:23:51 +01:00
parent 6711dd5694
commit 42558344f1
2 changed files with 16 additions and 0 deletions

View file

@ -1070,6 +1070,7 @@ pub fn uu_app() -> Command {
.about(ABOUT)
.infer_long_args(true)
.disable_help_flag(true)
.args_override_self(true)
.arg(
Arg::new(options::HELP)
.long(options::HELP)

View file

@ -3924,6 +3924,21 @@ fn test_ls_block_size_override() {
.stdout_contains_line("total 8");
}
#[test]
fn test_ls_block_size_override_self() {
new_ucmd!()
.arg("--block-size=512")
.arg("--block-size=512")
.succeeds();
new_ucmd!()
.arg("--human-readable")
.arg("--human-readable")
.succeeds();
new_ucmd!().arg("--si").arg("--si").succeeds();
}
#[test]
fn test_ls_hyperlink() {
let scene = TestScenario::new(util_name!());