Avoid printing on console when no binary found.

was getting `/usr/bin/which: no node in (/usr...` on every new session opened.
This commit is contained in:
Joaquim Pedro Silveira 2017-01-26 16:19:06 -02:00 committed by GitHub
parent 7577d37b7e
commit f32dcca91a

View File

@ -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