From 9bba4188b1c63ade3d8db20c53ec5a2a6da9731c Mon Sep 17 00:00:00 2001 From: Alex Gray Date: Wed, 8 Apr 2015 22:51:43 -0400 Subject: [PATCH] modified, per sorin-ionescu's comments, now matches style as seen in node module --- modules/command-not-found/init.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/command-not-found/init.zsh b/modules/command-not-found/init.zsh index f4a5a518..4b8d69c7 100644 --- a/modules/command-not-found/init.zsh +++ b/modules/command-not-found/init.zsh @@ -13,8 +13,8 @@ if [[ -s '/etc/zsh_command_not_found' ]]; then elif [[ -s '/usr/share/doc/pkgfile/command-not-found.zsh' ]]; then source '/usr/share/doc/pkgfile/command-not-found.zsh' # Load command-not-found on Mac OS X with https://github.com/bfontaine/homebrew-command-not-found installed -elif [[ $(type -f brew) ]] && [[ -s ${HANDLER=$(brew --prefix)/Library/Taps/bfontaine/homebrew-command-not-found/handler.sh} ]]; then - source "${HANDLER}" +elif (( $+commands[brew] )) && [[ -s "$(brew --prefix)/Library/Taps/bfontaine/homebrew-command-not-found/handler.sh" ]]; then + source "$(brew --prefix)/Library/Taps/bfontaine/homebrew-command-not-found/handler.sh" # Return if requirements are not found. else return 1