diff --git a/README.markdown b/README.markdown index 972beb1..ed4cf9c 100644 --- a/README.markdown +++ b/README.markdown @@ -354,6 +354,19 @@ add-zsh-hook chpwd load-nvmrc load-nvmrc ``` +## Other shells + +You can run nvm from other shells by using the script provided in the bin +directory. It must remain relative to the install. + +Add `/bin` and `/current/bin` to your PATH and use nvm transparantly. + +### Example [fish-shell](http://fishshell.com/) config: + +Where nvm is installed at `~/.nvm` + + set -x fish_user_paths $PATH $NVM_DIR/current/bin $NVM_DIR/bin + ## License nvm is released under the MIT license. diff --git a/bin/nvm b/bin/nvm new file mode 100755 index 0000000..85d4785 --- /dev/null +++ b/bin/nvm @@ -0,0 +1,8 @@ +#!/bin/bash + +export NVM_SYMLINK_CURRENT=true + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +source ${DIR}/../nvm.sh; + +nvm $@