mirror of
https://github.com/uutils/coreutils
synced 2024-10-07 16:39:26 +00:00
sort: use values_of
This commit is contained in:
parent
af6e92e012
commit
13458b4806
|
@ -1272,11 +1272,11 @@ pub fn uumain(args: impl uucore::Args) -> i32 {
|
|||
settings.separator = Some(separator.chars().next().unwrap())
|
||||
}
|
||||
|
||||
if matches.is_present(options::KEY) {
|
||||
for key in &matches.args[options::KEY].vals {
|
||||
if let Some(values) = matches.values_of(options::KEY) {
|
||||
for value in values {
|
||||
settings
|
||||
.selectors
|
||||
.push(FieldSelector::parse(&key.to_string_lossy(), &settings));
|
||||
.push(FieldSelector::parse(value, &settings));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue