gvmtool/gvm — pull request #108 by ganta (2013-01-09 14:18:50+00:00)
Title: Use "which" command exit status instead of the output: issue #106

Checking the presence or absence of the which's output in .zshrc.

[[ -s "${GVM_DIR}/bin/gvm-init.sh" && ! $(which gvm-init.sh) ]] && source "${GVM_DIR}/bin/gvm-init.sh"

The "which" of zsh always prints a message to stdout even if a command is not found.

% which gvm-init.sh
gvm-init.sh not found

Therefore, should be check the exit status of the command.