Sort `nvm ls` results by semver version, so the order goes: "unmerged node", "iojs", "merged node".

Jordan Harband 2015-09-30 22:05:18 -07:00
parent f73ee40dfe
commit 3d1ccfec70
1 changed files with 0 additions and 1 deletions

1
nvm.sh
View File

@ -635,7 +635,6 @@ nvm_ls() {
s#^\($NVM_IOJS_PREFIX\)[-/]v#\1.v#;
s#^\($NVM_NODE_PREFIX\)[-/]v#\1.v#" \
| command sort -t. -u -k 2.2,2n -k 3,3n -k 4,4n \
| command sort -s -t- -k1.1,1.1 \
| command sed "
s/^\($NVM_IOJS_PREFIX\)\./\1-/;
s/^$NVM_NODE_PREFIX\.//" \