Created
April 3, 2017 22:41
-
-
Save bayleedev/46d665542e9ad6ea264187c00be1a934 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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