Simple zsh plugin that automatically runs fnm use if you enter a folder which contains an .nvmrc file.
You dont need to do anything. Once it's installed, zsh-autoswitch
will automatically run fnm for you when needed.
You must have fnm installed, on your $PATH and configured correctly in your .zshrc.
zsh-autoswitch-fnm
officially supports zsh versions 5.1 onwards.
It is possible the plugin might work on even older versions. However they would not have been tested as part of the CI test process.
Add one of the following to your .zshrc
file depending on your package manager:
zplug "MichaelAquilina/zsh-autoswitch-fnm"
antigen bundle "MichaelAquilina/zsh-autoswitch-fnm"
zgen load "MichaelAquilina/zsh-autoswitch-fnm"
Clone this repository into $ZSH_CUSTOM/custom/plugins
:
git clone https://github.com/MichaelAquilina/zsh-autoswitch-fnm.git $ZSH_CUSTOM/plugins/you-should-use
$ZSH_CUSTOM
is oh-my-zsh’s customization directory (docs).
Then add zsh-autoswitch-fnm
to the plugins
array in your .zshrc
:
plugins=(
# ...
zsh-autoswitch-fnm
# ...
)
Pull requests and Feedback are welcome! 🎉