mirror of
https://github.com/wting/autojump
synced 2024-10-27 20:34:07 +00:00
Test for brew existence before testing for brew zsh site functions directory.
The previous test condition would cause errors because even though brew didn't exist, the directory /share/zsh/site-functions did and it would throw error messages on non-homebrew systems.
This commit is contained in:
parent
f46b541105
commit
48c52a7422
@ -17,10 +17,11 @@ if [[ -d ${HOME}/.autojump ]]; then
|
|||||||
path=(${HOME}/.autojump/bin ${path})
|
path=(${HOME}/.autojump/bin ${path})
|
||||||
fpath=(${HOME}/.autojump/functions/ ${fpath})
|
fpath=(${HOME}/.autojump/functions/ ${fpath})
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# set fpath if necessary for homebrew installation
|
# set fpath if necessary for homebrew installation
|
||||||
if [[ -d "`brew --prefix 2>/dev/null`/share/zsh/site-functions" ]]; then
|
command -v brew &>/dev/null \
|
||||||
fpath=(`brew --prefix`/share/zsh/site-functions ${fpath})
|
&& [[ -d "`brew --prefix`/share/zsh/site-functions" ]] \
|
||||||
fi
|
&& fpath=(`brew --prefix`/share/zsh/site-functions ${fpath})
|
||||||
|
|
||||||
function autojump_preexec() {
|
function autojump_preexec() {
|
||||||
if [[ "${AUTOJUMP_KEEP_SYMLINKS}" == "1" ]]; then
|
if [[ "${AUTOJUMP_KEEP_SYMLINKS}" == "1" ]]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user