zsh-nvm-auto-use is a oh-my-zsh plugin automatically switches node version, nvm use, when a .nvmrc is detected.
Put the script in the oh-my-zsh plugins folder
cd ~/.oh-my-zsh/custom/plugins
git clone [email protected]:martvdmoosdijk/zsh-nvm-auto-use.gitActivate the plugin in your .zshrc file
vim ~/.zshrc
plugins=(zsh-nvm-auto-use)Restart or source your terminal
source ~/.zshrcMake sure you already have nvm loaded before this runs — usually Oh My Zsh takes care of it if you're using the nvm plugin.