brew.plugin.zsh 707 B

12345678910111213
  1. # Move /usr/local/bin (path where brews are linked) to the front of the path
  2. # This will allow us to override system binaries like ruby with our brews
  3. # TODO: Do this in a more compatible way.
  4. # What if someone doesn't have /usr/bin in their path?
  5. export PATH=`echo $PATH | sed -e 's|/usr/local/bin||' -e 's|::|:|g'` # Remove /usr/local/bin
  6. export PATH=`echo $PATH | sed -e 's|/usr/bin|/usr/local/bin:&|'` # Add it in front of /usr/bin
  7. export PATH=`echo $PATH | sed -e 's|/usr/bin|/usr/local/sbin:&|'` # Add /usr/local/sbin
  8. alias brews='brew list -1'
  9. function brew-link-completion {
  10. ln -s "$(brew --prefix)/Library/Contributions/brew_zsh_completion.zsh" "$ZSH/plugins/brew/_brew.official"
  11. }