diff --git a/nvm.sh b/nvm.sh index c6b8f83..45a6a9d 100755 --- a/nvm.sh +++ b/nvm.sh @@ -2163,8 +2163,10 @@ $NVM_LS_REMOTE_POST_MERGED_OUTPUT" | command grep -v "N/A" | command sed '/^$/d' return 127 fi [ ! -f "$NVM_ALIAS_DIR/$2" ] && echo "Alias $2 doesn't exist!" >&2 && return + local NVM_ALIAS_ORIGINAL + NVM_ALIAS_ORIGINAL="$(nvm_alias "$2")" command rm -f "$NVM_ALIAS_DIR/$2" - echo "Deleted alias $2" + echo "Deleted alias $2 - restore it with \`nvm alias $2 "$NVM_ALIAS_ORIGINAL"\`" ;; "reinstall-packages" | "copy-packages" ) if [ $# -ne 2 ]; then