Skip to content

Instantly share code, notes, and snippets.

@bayleedev
Created Apr 3, 2017
Embed
What would you like to do?
setnvm() {
if [ "$PWD" != "$MYOLDPWD" ]; then
MYOLDPWD="$PWD";
if [ -e "$PWD/.nvmrc" ]; then
nvm use
fi
fi
}
function cd () { builtin cd "$@" && setnvm; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment