diff --git a/bin/autojump.zsh b/bin/autojump.zsh index 92c31d7..a761206 100644 --- a/bin/autojump.zsh +++ b/bin/autojump.zsh @@ -10,8 +10,11 @@ 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}) +if command -v brew &>/dev/null; then + 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 fi