diff --git a/autojump.zsh b/autojump.zsh index 83dde8a..add641e 100644 --- a/autojump.zsh +++ b/autojump.zsh @@ -33,6 +33,10 @@ if [[ -d ~/.autojump/ ]]; then path=(~/.autojump/bin $path) fpath=(~/.autojump/functions/ $fpath) fi +# set fpath if necessary for homebrew installation +if [[ -n "`which brew`" && -d `brew --prefix`/share/zsh/functions ]]; then + fpath=(`brew --prefix`/share/zsh/functions $fpath) +fi function autojump_preexec() { if [[ "${AUTOJUMP_KEEP_SYMLINKS}" == "1" ]]