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:
commit
9ad70a4f5d
2 changed files with 9 additions and 0 deletions
|
@ -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(
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue