brew.plugin.zsh 694 B

123456789101112131415161718192021
  1. alias brewp='brew pin'
  2. alias brewsp='brew list --pinned'
  3. alias bubo='brew update && brew outdated'
  4. alias bubc='brew upgrade && brew cleanup'
  5. alias bubu='bubo && bubc'
  6. alias buf='brew upgrade --formula'
  7. alias bcubo='brew update && brew outdated --cask'
  8. alias bcubc='brew upgrade --cask && brew cleanup'
  9. function brews() {
  10. local formulae="$(brew leaves | xargs brew deps --installed --for-each)"
  11. local casks="$(brew list --cask)"
  12. local blue="$(tput setaf 4)"
  13. local bold="$(tput bold)"
  14. local off="$(tput sgr0)"
  15. echo "${blue}==>${off} ${bold}Formulae${off}"
  16. echo "${formulae}" | sed "s/^\(.*\):\(.*\)$/\1${blue}\2${off}/"
  17. echo "\n${blue}==>${off} ${bold}Casks${off}\n${casks}"
  18. }