nvm
nvm copied to clipboard
Why does 'ls-remote' start from the bottom of versions and not the top?
[Sorry for removing the issue template, but none of the points made sense for this ticket.]
I always wonder why 'ls-remote' doesn't start from the newest version, which mostly would allow for almost instant CTRL+C without waiting half a minute for the complete list. Is there any particular reason for this? Usually I am always too little bothered to mention it somewhere but today I thought that this has been the case for several years now and it finally should be discussed. :)
Seriously, who wants to install the node versions below 1? Below 10? Below 15?.... That ordering should be descending in my humble opinion.
Thanks for this awesome product! 🚀
Because that’s how they’re listed on the remote server, so it would be a lot slower to reverse the entire download - you’d end up waiting more time.
i mean you can just list the latest major, or --lts
, etc, so usually that’s what i do when I’m not trying to see everything.
what's a "negative LTS"? --lts
says, only show me LTS versions.
@ljharb Thx for responding. If it's the remote that delivers the list in a badly sorted way, can we somehow raise a ticket there? Wherever that is.
You certainly could file an issue on nodejs/release requesting the order be inverted - although that would probably break lots of version manager users, so it’s only really practical as a separate index file, which probably won’t be worth it since it’d be two sources of truth.
😢😭😭
@raphaellueckl I'm actually quite glad that it is this way, since on my machine the listing is instant and I don't have to scroll some 18 pages to get to the latest versions. But if you really prefer it in reverse order nvs seems to have it that way.
You can get this by nvm ls-remote | tac
, for example (or a workaround if tac
isn't present on your system).
For the reasons described above, I don't think this is something nvm should worry about.
@ljharb It's not the same, since your command has to wait for the completion to show anything...
@kuchta because of the ordering in the source data, that’s impossible to avoid, for nvm or for users.
@ljharb I don't know from where the source data come from, but I'm quite sure it can be improved by first class support in the command, since getting even few thousands lines could be get in a blink of an eye...
@kuchta nvm ls-remote | tac
works super fast for me, so i doubt it can be improved in the tool. The source data is https://nodejs.org/dist/index.tab