Skip to content

Commit

Permalink
fix version sort for matching GNU ls (#843)
Browse files Browse the repository at this point in the history
  • Loading branch information
juansc authored Jul 6, 2023
1 parent 71156b8 commit 4514713
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Color theme is now expected to be in `$XDG/lsd/colors.yaml` by default from [peppidesu](https://github.com/peppidesu)
Legacy behaviour (`themes` folder) is marked as deprecated but is still supported.
[#749](https://github.com/lsd-rs/lsd/issues/749)
- Version sort option `-v, --versionsort` has been updated to match GNU version sort logic,
similar to `ls -v` and `sort -V` [#801](https://github.com/lsd-rs/lsd/issues/801) from [juansc](https://github.com/juansc)

## [0.23.1] - 2022-09-13

Expand Down
15 changes: 11 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ yaml-rust = "0.4.*"
serde = { version = "1.0", features = ["derive"] }
serde_yaml = "0.8"
url = "2.1.*"
vsort = "0.1.0"

[target."cfg(not(all(windows, target_arch = \"x86\", target_env = \"gnu\")))".dependencies]
# if ssl feature is enabled compilation will fail on arm-unknown-linux-gnueabihf and i686-pc-windows-gnu
Expand Down
2 changes: 1 addition & 1 deletion src/sort.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::flags::{DirGrouping, Flags, SortColumn, SortOrder};
use crate::meta::Meta;
use human_sort::compare;
use std::cmp::Ordering;
use vsort::compare;

pub type SortFn = fn(&Meta, &Meta) -> Ordering;

Expand Down

0 comments on commit 4514713

Please sign in to comment.