Просмотр исходного кода

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.
pull/157/head
William Ting 12 лет назад
Родитель
Сommit
48c52a7422
1 измененных файлов: 4 добавлений и 3 удалений
  1. +4
    -3
      bin/autojump.zsh

+ 4
- 3
bin/autojump.zsh Просмотреть файл

@ -17,10 +17,11 @@ if [[ -d ${HOME}/.autojump ]]; then
path=(${HOME}/.autojump/bin ${path})
fpath=(${HOME}/.autojump/functions/ ${fpath})
fi
# set fpath if necessary for homebrew installation
if [[ -d "`brew --prefix 2>/dev/null`/share/zsh/site-functions" ]]; then
fpath=(`brew --prefix`/share/zsh/site-functions ${fpath})
fi
command -v brew &>/dev/null \
&& [[ -d "`brew --prefix`/share/zsh/site-functions" ]] \
&& fpath=(`brew --prefix`/share/zsh/site-functions ${fpath})
function autojump_preexec() {
if [[ "${AUTOJUMP_KEEP_SYMLINKS}" == "1" ]]; then

Загрузка…
Отмена
Сохранить