Natural sorting is required for newer versions to be listed as "recent"
Closed this issue · 3 comments
As of today, 0.14.9
is marked as recent, while 0.14.10 is not. I'm guessing this is because the version numbers are sorted using standard sort
instead of a natural sorting algorithm.
@skyzyx
Hey Ryan, what command are you running:
When I run tfswitch --latest-stable 0.14
, I see:
When I run tfswitch --latest
, I see:
When I run tfswitch
, I see 14.10 at the top:
Can you post a screenshot of what you're seeing?
@skyzyx the *recent
here means that that's the most recent version that you have used on your machine. In this case, it means - you have "recently" used version 0.14.10 (this does not mean this is the latest version released by Hashicorp).
tfswitch
remember the last 3 recent version that you have used. That way, it's easy to switch instead of scrolling all the way down.
For example : (the order of switching to different terraform version using tfswitch)
Project 1 : terraform 0.14.8
-> Project 2 : terraform 0.14.9
-> Project 3 : terraform 0.11.13
-> Project 4 :terraform 0.10.08
The dropdown should show:
0.10.08 *recent
0.11.13 *recent
0.14.9 *recent
Since these are the 3 last recent version that was used.