Make nvm alias list implicit "stable" and "unstable" aliases when they're not already aliases.
This commit is contained in:
10
nvm.sh
10
nvm.sh
@@ -876,6 +876,16 @@ nvm() {
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
for ALIAS in "stable" "unstable"; do
|
||||
if [ ! -f "$NVM_DIR/alias/$ALIAS" ]; then
|
||||
if [ $# -lt 2 ] || [ "~$ALIAS" = "~$2" ]; then
|
||||
DEST="$(nvm_print_implicit_alias local "$ALIAS")"
|
||||
VERSION="$(nvm_version "$DEST")"
|
||||
echo "$ALIAS -> $DEST (-> $VERSION) (default)"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
return
|
||||
fi
|
||||
if [ -z "$3" ]; then
|
||||
|
||||
Reference in New Issue
Block a user