Automatically switch versions of node by looking for a .nvmrc file in the path tree
-
Clone this repository into
$ZSH_CUSTOM/plugins
(by default~/.oh-my-zsh/custom/plugins
)git clone https://github.com/aspirewit/zsh-nvm-auto-switch ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-nvm-auto-switch
-
Add the plugin to the list of plugins for Oh My Zsh to load (inside
~/.zshrc
):plugins=(zsh-nvm-auto-switch)
-
Start a new terminal session.
-
Clone this repository somewhere on your machine. This guide will assume
~/.zsh/zsh-nvm-auto-switch
.git clone https://github.com/aspirewit/zsh-nvm-auto-switch ~/.zsh/zsh-nvm-auto-switch
-
Add the following to your
.zshrc
:source ~/.zsh/zsh-nvm-auto-switch/zsh-nvm-auto-switch.zsh
-
Start a new terminal session.