`zvm ls --all` doesn't sort versions correctly
itsrainingmani opened this issue · 1 comments
itsrainingmani commented
When using zvm ls --all
, the currently displayed order is not sorted according to semver. This is likely due to a requirement in semver.Sort
that semantic version strings must begin with a leading "v", as in "v1.0.0".
Current Order -
master
0.1.1
0.10.0
0.10.1
0.11.0
0.2.0
0.3.0
0.4.0
0.5.0
0.6.0
0.7.0
0.7.1
0.8.0
0.8.1
0.9.0
0.9.1
Expected Order -
master
0.11.0
0.10.1
0.10.0
0.9.1
0.9.0
0.8.1
0.8.0
0.7.1
0.7.0
0.6.0
0.5.0
0.4.0
0.3.0
0.2.0
0.1.1
itsrainingmani commented
Unrelated to zvm ls --all
but I didn't want to make a separate issue for this -
I was poking into the behavior of zvm ls
and I noticed that the highlighting of the current version doesn't work if the current version is master
. It seems like that case was being handled in an earlier version of ls.go
but then got removed. Is there a reason for that?
I'm happy to amend my PR to fix that if that's ok with you :)