zsh-nvm-auto-switch icon indicating copy to clipboard operation
zsh-nvm-auto-switch copied to clipboard

Automatically switch versions of node by looking for a .nvmrc file in the path tree

zsh-nvm-auto-switch

Automatically switch versions of node by looking for a .nvmrc file in the path tree

Installation

  • Oh My Zsh
  • Manual

Oh My Zsh

  1. 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
    
  2. Add the plugin to the list of plugins for Oh My Zsh to load (inside ~/.zshrc):

    plugins=(zsh-nvm-auto-switch)
    
  3. Start a new terminal session.

Manual (Git Clone)

  1. 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
    
  2. Add the following to your .zshrc:

    source ~/.zsh/zsh-nvm-auto-switch/zsh-nvm-auto-switch.zsh
    
  3. Start a new terminal session.

Acknowledgments