diff --git a/nvm.sh b/nvm.sh index f12b259..85e7ffb 100644 --- a/nvm.sh +++ b/nvm.sh @@ -3970,7 +3970,7 @@ nvm() { # so, unalias it. nvm unalias "${ALIAS}" return $? - elif grep -q "#" <<< "${ALIAS}"; then + elif echo $ALIAS | grep -q "#"; then nvm_err "Aliases may not have a # inside it" exit 1 elif [ "${TARGET}" != '--' ]; then diff --git "a/test/slow/nvm use/Running \"nvm use\" ignores comments in the .nvmrc" "b/test/slow/nvm use/Running \"nvm use\" ignores comments in the nvmrc" similarity index 97% rename from "test/slow/nvm use/Running \"nvm use\" ignores comments in the .nvmrc" rename to "test/slow/nvm use/Running \"nvm use\" ignores comments in the nvmrc" index f2c0885..0bf5dde 100755 --- "a/test/slow/nvm use/Running \"nvm use\" ignores comments in the .nvmrc" +++ "b/test/slow/nvm use/Running \"nvm use\" ignores comments in the nvmrc" @@ -14,4 +14,4 @@ EXPECTED_OUTPUT="Found '$(nvm_find_up .nvmrc)/.nvmrc' with version " [ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] \ || die "'nvm_rc_version' did not output '$EXPECTED_OUTPUT'; got '$OUTPUT'" -rm -f .nvmrc \ No newline at end of file +rm -f .nvmrc