From 0cd8789d1e9fdde6dea7b79461e44c8289c7bb90 Mon Sep 17 00:00:00 2001 From: Eric Henderson Date: Tue, 15 Feb 2022 17:11:47 -0500 Subject: [PATCH] make it possible to disable auto-use after shell init --- zsh-nvm.plugin.zsh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/zsh-nvm.plugin.zsh b/zsh-nvm.plugin.zsh index 59e4bbb..17f7e20 100644 --- a/zsh-nvm.plugin.zsh +++ b/zsh-nvm.plugin.zsh @@ -164,6 +164,9 @@ _zsh_nvm_revert() { autoload -U add-zsh-hook _zsh_nvm_auto_use() { _zsh_nvm_has nvm_find_nvmrc || return + if [[ $NVM_AUTO_USE != 'true' ]]; then + return + fi local node_version="$(nvm version)" local nvmrc_path="$(nvm_find_nvmrc)"