1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 03:27:44 +00:00

Merge pull request #2480 from miDeb/sort/key-args

sort: make -k only take one argument per flag
This commit is contained in:
Sylvestre Ledru 2021-07-06 18:58:50 +02:00 committed by GitHub
commit 9ad70a4f5d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 0 deletions

View file

@ -1267,6 +1267,7 @@ pub fn uu_app() -> App<'static, 'static> {
.help("sort by a key")
.long_help(LONG_HELP_KEYS)
.multiple(true)
.number_of_values(1)
.takes_value(true),
)
.arg(

View file

@ -951,3 +951,11 @@ fn test_conflict_check_out() {
);
}
}
#[test]
fn test_key_takes_one_arg() {
new_ucmd!()
.args(&["-k", "2.3", "keys_open_ended.txt"])
.succeeds()
.stdout_is_fixture("keys_open_ended.expected");
}