]> arthur.barton.de Git - ax-zsh.git/blob - plugins/homebrew/homebrew.zprofile
virtualenvwrapper: Try to set PROJECT_HOME harder
[ax-zsh.git] / plugins / homebrew / homebrew.zprofile
1 # AX-ZSH: Alex' Modular ZSH Configuration
2 # homebrew.zprofile -- Setup Homebrew Package Manager
3
4 # Make sure that "brew(1)" is installed
5 (( $+commands[brew] )) || return
6
7 [[ -d "/usr/local/share/zsh-completions" ]] \
8         && axzsh_fpath=(/usr/local/share/zsh-completions $axzsh_fpath)
9
10 completion_file="$(brew --prefix)/Library/Contributions/brew_zsh_completion.zsh"
11 target_file="$(dirname "$0")/functions/_brew"
12
13 [[ -r "$completion_file" && ! -r "$target_file" ]] \
14         && ln -fs "$completion_file" "$target_file"
15
16 unset completion_file target_file