-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sort could cater for version numbers #134
Comments
that's a good point—generalized human sorting would be also be a nice enhancement. Not sure when I'd get to this personally but I'd be happy to accept a PR. I'm not sure what's going on with your bash expression. Here's an alternative that worked for me:
My guess is maybe it's confusing the TTY detection machinery in your case? |
probably the cleanest way to add this would be adding an optional |
Note on the Output Grouping example I posted, I've never noticed but when you run it with cat it does not work. I've always used Output Grouping with ps to sort the output but still retain the header ontop in the right place.
I thought I would be able to sort |
With "sort -V" sort will properly sort anything with a version (as used in one of the examples). I seems that ag does not use the same std output as when I use bash Output Grouping I get no output:
version _sum
The example mentions a sort with this output but could it not include version sorting as provided by
sort -V
?Is sorting already built in and I should not be using bash's sort to sort versions?
Regular sort:
v0.10.0 66
v0.11.0 29
v0.12.0 172
v0.13.0 118
v0.14.1 15
v0.15.0 127
v0.2.0 25
v0.2.1 23
v0.3.0 30
v0.3.1 32
v0.3.2 26
v0.3.3 24
v0.4.0 22
v0.5.0 26
v0.5.1 21
Sort -V
v0.2.0 25
v0.2.1 23
v0.3.0 30
v0.3.1 32
v0.3.2 26
v0.3.3 24
v0.4.0 22
v0.5.0 26
v0.5.1 21
v0.6.0 25
The text was updated successfully, but these errors were encountered: