From f32dcca91a81c15c210e483b8bef587eef442e4b Mon Sep 17 00:00:00 2001 From: Joaquim Pedro Silveira Date: Thu, 26 Jan 2017 16:19:06 -0200 Subject: [PATCH] Avoid printing on console when no binary found. was getting `/usr/bin/which: no node in (/usr...` on every new session opened. --- zsh-nvm.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zsh-nvm.plugin.zsh b/zsh-nvm.plugin.zsh index 77599c8..36fa3ae 100644 --- a/zsh-nvm.plugin.zsh +++ b/zsh-nvm.plugin.zsh @@ -89,7 +89,7 @@ _zsh_nvm_lazy_load() { local cmds cmds=() for bin in $global_binaries; do - [[ "$(which $bin)" = "$bin: aliased to "* ]] || cmds+=($bin) + [[ "$(which $bin 2>/dev/null)" = "$bin: aliased to "* ]] || cmds+=($bin) done # Create function for each command