Browse Source

Include LTS version in `nvm_ls_remote` output.

Jordan Harband 9 years ago
parent
commit
865d2fe3d6
No known key found for this signature in database
GPG Key ID: 64A196AEE0916D55
  1. 10
      nvm.sh
  2. 2
      test/fast/Unit tests/mocks/nvm_ls_remote.txt

10
nvm.sh

@ -903,7 +903,7 @@ nvm_ls_remote_index_tab() { @@ -903,7 +903,7 @@ nvm_ls_remote_index_tab() {
PATTERN="$(nvm_ensure_version_prefix "$PATTERN")"
fi
else
PATTERN=".*"
unset PATTERN
fi
ZSH_HAS_SHWORDSPLIT_UNSET=1
if nvm_has "setopt"; then
@ -914,8 +914,12 @@ nvm_ls_remote_index_tab() { @@ -914,8 +914,12 @@ nvm_ls_remote_index_tab() {
| command sed "
1d;
s/^/$PREFIX/;
s/[[:blank:]].*//" \
| nvm_grep -w "$PATTERN" \
" \
| command awk -v pattern="${PATTERN-}" '{
if (!$1) { next }
if (pattern && tolower($1) !~ tolower(pattern)) { next }
if ($10 !~ /^\-?$/ && ! a[$10]++) print $1, $10; else print $1
}' \
| $SORT_COMMAND)"
if [ "$ZSH_HAS_SHWORDSPLIT_UNSET" -eq 1 ] && nvm_has "unsetopt"; then
unsetopt shwordsplit

2
test/fast/Unit tests/mocks/nvm_ls_remote.txt

@ -251,7 +251,7 @@ v4.4.3 @@ -251,7 +251,7 @@ v4.4.3
v4.4.4
v4.4.5
v4.4.6
v4.4.7
v4.4.7 Argon
v5.0.0
v5.1.0
v5.1.1

Loading…
Cancel
Save