This file contains 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
# This will run `nvm use` everytime you change directory, if | |
# 1. an .nvmrc file is present | |
# 2. there is no .nvmrc but you're not using your default node | |
# Add it to your `.bash_profile` (or wherever else is suitable for your setup). | |
enter_directory(){ | |
if [ "$PWD" != "$PREV_PWD" ]; then | |
PREV_PWD="$PWD"; | |
if [ -e ".nvmrc" ]; then | |
nvm use; |