oh-my-bash/plugins/nvm
2023-12-12 13:36:17 +09:00
..
nvm.plugin.sh lib/nvm: Update autoloader to keep up with the upstream (#506) 2023-12-12 13:36:17 +09:00
README.md plugins/nvm: Fix docs, clean up code, and add license 2022-12-05 07:29:55 +09:00

nvm plugin

This plugin automatically source nvm1

Installation

Install nvm

Lets install2 the nvm without updaing shell config!

export NVM_DIR="$HOME/.nvm" && (
  git clone https://github.com/nvm-sh/nvm.git "$NVM_DIR"
  cd "$NVM_DIR"
  git checkout `git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1)`
) && \. "$NVM_DIR/nvm.sh"

Include nvm as plugin

plugins=(
  git
  nvm
)

nvm completion configuration

completions=(
  git
  composer
  ssh
  nvm
)

.nvmrc autoload

If set, the plugin will automatically load a node version when it finds a .nvmrc file3 in the current working directory indicating which node version to load. This can be done by adding the following to your .bashrc:

OMB_PLUGIN_NVM_AUTO_USE=true