mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-29 20:17:45 +00:00
ls: Extension sorting, use file_stem() instead of to_string_lossy()
This commit is contained in:
parent
bbcca3eefd
commit
9c221148a8
1 changed files with 1 additions and 1 deletions
|
@ -1167,7 +1167,7 @@ fn sort_entries(entries: &mut Vec<PathData>, config: &Config) {
|
||||||
Sort::Extension => entries.sort_by(|a, b| {
|
Sort::Extension => entries.sort_by(|a, b| {
|
||||||
a.extension()
|
a.extension()
|
||||||
.cmp(&b.extension())
|
.cmp(&b.extension())
|
||||||
.then(a.to_string_lossy().cmp(&b.to_string_lossy()))
|
.then(a.file_stem().cmp(&b.file_stem()))
|
||||||
}),
|
}),
|
||||||
Sort::None => {}
|
Sort::None => {}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue