Skip to content

Commit

Permalink
Merge pull request #33 from DimitarVanguelov/patch-1
Browse files Browse the repository at this point in the history
Natural sort order in `list all` command
  • Loading branch information
rkyleg authored Jan 6, 2024
2 parents 08ddbff + c5afa46 commit 02ccbfa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/list-all
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

function sort_versions() {
sed 'h; s/[+-]/./g; s/.p\([[:digit:]]\)/.z\1/; s/$/.z/; G; s/\n/ /' | \
LC_ALL=C sort -gt. -k 1,1 -k 2,2n -k 3,3n -k 4,4n -k 5,5n | sort -r - | awk '{print $2}'
LC_ALL=C sort -gt. -k 1,1 -k 2,2n -k 3,3n -k 4,4n -k 5,5n | awk '{arr[NR]=$0} END {for (i=NR; i>0; i--) {split(arr[i], a, " "); print a[2]}}'
}

releases=$(mktemp)
Expand Down

0 comments on commit 02ccbfa

Please sign in to comment.