Add flag for case-insensitive sort-by (#2225)

* Add flag for case-insensitive sort-by

* Fix test names

* Fix documentation comments
This commit is contained in:
Joseph T. Lyons
2020-07-20 13:31:58 -04:00
committed by GitHub
parent 7b1a15b223
commit 6eb2c94209
7 changed files with 201 additions and 7 deletions

View File

@ -73,7 +73,7 @@ pub fn median(values: &[Value], name: &Tag) -> Result<Value, ShellError> {
sorted.push(item.clone());
}
crate::commands::sort_by::sort(&mut sorted, &[], name)?;
crate::commands::sort_by::sort(&mut sorted, &[], name, false)?;
match take {
Pick::Median => {

View File

@ -77,7 +77,7 @@ pub fn mode(values: &[Value], name: &Tag) -> Result<Value, ShellError> {
}
}
crate::commands::sort_by::sort(&mut modes, &[], name)?;
crate::commands::sort_by::sort(&mut modes, &[], name, false)?;
Ok(UntaggedValue::Table(modes).into_value(name))
}