diff --git a/bin/autojump.zsh b/bin/autojump.zsh index 92c31d7..79f7cd2 100644 --- a/bin/autojump.zsh +++ b/bin/autojump.zsh @@ -10,8 +10,9 @@ fi # set homebrew installation paths -if command -v brew &>/dev/null && [[ -d "$(brew --prefix)/share/zsh/site-functions" ]]; then - fpath=("$(brew --prefix)/share/zsh/site-functions" ${fpath}) +local brew_prefix=${BREW_PREFIX:-$(brew --prefix)} +if [[ -d "${brew_prefix}/share/zsh/site-functions" ]]; then + fpath=("${brew_prefix}/share/zsh/site-functions" ${fpath}) fi