Skip to content
Myr

Don't list uninstalled implicit aliases

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Jordan Harband · committed by Jordan Harband · parent 8f76b35 · Browse files · 1 file+5 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+5 added−3 removed

  • other:+5 added−3 removed

1 file+5 added−3 removed

modified:nvm.sh+5 added-3 removed
889 unmodified lines
890 if [ $# -le 2 ]; then891 local DEST892 for ALIAS_PATH in "$NVM_DIR"/alias/"$2"*; do893 ALIAS="$(basename "$ALIAS_PATH")"894 DEST="$(nvm_alias "$ALIAS" 2&>1 > /dev/null)"894 DEST="$(nvm_alias "$ALIAS" 2> /dev/null)"895 if [ -n "$DEST" ]; then896 VERSION="$(nvm_version "$DEST")"897 if [ "_$DEST" = "_$VERSION" ]; then898 echo "$ALIAS -> $DEST"
6 unmodified lines
905 for ALIAS in "stable" "unstable"; do906 if [ ! -f "$NVM_DIR/alias/$ALIAS" ]; then907 if [ $# -lt 2 ] || [ "~$ALIAS" = "~$2" ]; then908 DEST="$(nvm_print_implicit_alias local "$ALIAS")"909 if [ "_$DEST" != "_" ]; then909 VERSION="$(nvm_version "$DEST")"910 echo "$ALIAS -> $DEST (-> $VERSION) (default)"910 VERSION="$(nvm_version "$DEST")"911 echo "$ALIAS -> $DEST (-> $VERSION) (default)"912 fi913 fi914 fi915 done916 return
80 unmodified lines