diff --git a/zsh-nvm.plugin.zsh b/zsh-nvm.plugin.zsh index feca270..4ed66d6 100644 --- a/zsh-nvm.plugin.zsh +++ b/zsh-nvm.plugin.zsh @@ -116,5 +116,9 @@ _zsh_nvm_revert() { # Install nvm if it isn't already installed [[ ! -f "$NVM_DIR/nvm.sh" ]] && _zsh_nvm_install -# If nvm is installed, load it -[[ -f "$NVM_DIR/nvm.sh" ]] && _zsh_nvm_load +# If nvm is installed +if [[ -f "$NVM_DIR/nvm.sh" ]]; then + + # Load it + [[ "$NVM_LAZY_LOAD" == true ]] && _zsh_nvm_lazy_load || _zsh_nvm_load +fi