0
0
mirror of https://github.com/tj/n.git synced 2024-11-29 05:42:48 +01:00

Merge pull request #349 from not-an-aardvark/sort-semver

Sort double-digit semver numbers correctly
This commit is contained in:
Travis Webb 2016-10-06 15:18:39 -04:00 committed by GitHub
commit 55a021b661

2
bin/n
View File

@ -284,7 +284,7 @@ versions_paths() {
find $BASE_VERSIONS_DIR -maxdepth 2 -type d \
| sed 's|'$BASE_VERSIONS_DIR'/||g' \
| egrep "/[0-9]+\.[0-9]+\.[0-9]+$" \
| sort -k 1 -k 2,2n -k 3,3n -t .
| sort -k 1,1 -k 2,2n -k 3,3n -t .
}
#