From 0dad2bdef2688640fdf2b73b95dbcb6c134fb3d5 Mon Sep 17 00:00:00 2001 From: Luke Childs Date: Fri, 16 Dec 2016 19:48:12 +0700 Subject: [PATCH] Make sure only aliases conflicts are removed from lazy loading Binary conflicts are ok. Fixes #15 --- zsh-nvm.plugin.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zsh-nvm.plugin.zsh b/zsh-nvm.plugin.zsh index e9ce389..f2d19f1 100644 --- a/zsh-nvm.plugin.zsh +++ b/zsh-nvm.plugin.zsh @@ -78,11 +78,11 @@ _zsh_nvm_lazy_load() { # Add nvm global_binaries+=('nvm') - # Remove any binaries that conflict with current globals + # Remove any binaries that conflict with current aliases local cmds cmds=() for bin in $global_binaries; do - _zsh_nvm_has $bin || cmds+=($bin) + [[ "$(which $bin)" = "$bin: aliased to "* ]] || cmds+=($bin) done # Create function for each command