Looks for a .nvmrc file in your current directory, every time you cd. If one is found, it loads the version via nvm use and throws out any output.
cd() {
builtin cd "$@"
if [[ -f .nvmrc ]]; then
nvm use > /dev/null
fi
}
cd .
Looks for a .nvmrc file in your current directory, every time you cd. If one is found, it loads the version via nvm use and throws out any output.
cd() {
builtin cd "$@"
if [[ -f .nvmrc ]]; then
nvm use > /dev/null
fi
}
cd .