mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
Merge pull request #2480 from miDeb/sort/key-args
sort: make -k only take one argument per flag
This commit is contained in:
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user