From e379610cb929b635247280cb19e685af1c167c4d Mon Sep 17 00:00:00 2001 From: Luke Childs Date: Sat, 1 Oct 2016 13:36:45 +0100 Subject: [PATCH] Make lazy loading compatible with no use option --- zsh-nvm.plugin.zsh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/zsh-nvm.plugin.zsh b/zsh-nvm.plugin.zsh index b05f18e..d48374a 100644 --- a/zsh-nvm.plugin.zsh +++ b/zsh-nvm.plugin.zsh @@ -66,9 +66,14 @@ _zsh_nvm_load() { _zsh_nvm_lazy_load() { - # Get all global node module binaries (including node) + # Get all global node module binaries including node + # (only if NVM_NO_USE is off) local global_binaries - global_binaries=($(_zsh_nvm_global_binaries)) + if [[ "$NVM_NO_USE" == true ]]; then + global_binaries=() + else + global_binaries=($(_zsh_nvm_global_binaries)) + fi # Add nvm global_binaries+=('nvm')