From 055d068c7bad51b68b15a8275fa7d5ed2238f6d5 Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Sun, 19 May 2013 16:24:47 -0400 Subject: [PATCH] [Fix #411] Add Homebrew module --- modules/README.md | 5 +++++ modules/homebrew/README.md | 26 ++++++++++++++++++++++++++ modules/homebrew/init.zsh | 25 +++++++++++++++++++++++++ 3 files changed, 56 insertions(+) create mode 100644 modules/homebrew/README.md create mode 100644 modules/homebrew/init.zsh diff --git a/modules/README.md b/modules/README.md index 2d89b1d905..63484e4ca7 100644 --- a/modules/README.md +++ b/modules/README.md @@ -71,6 +71,11 @@ History Sets history options and defines history aliases. +Homebrew +-------- + +Defines Homebrew aliases. + Macports -------- diff --git a/modules/homebrew/README.md b/modules/homebrew/README.md new file mode 100644 index 0000000000..c8e6d4e2cb --- /dev/null +++ b/modules/homebrew/README.md @@ -0,0 +1,26 @@ +Homebrew +======== + +Defines Homebrew aliases. + +Aliases +------- + + - `brewc` cleans outdated brews and their cached archives. + - `brewC` cleans outdated brews, including keg-only, and their cached archives. + - `brewi` installs a formula. + - `brewl` lists installed formulae. + - `brews` searches for a formula. + - `brewU` upgrades Homebrew and outdated brews. + - `brewu` upgrades Homebrew. + - `brewx` uninstalls a formula. + +Authors +------- + +*The authors of this module should be contacted via the [issue tracker][1].* + + - [Sorin Ionescu](https://github.com/sorin-ionescu) + +[1]: https://github.com/sorin-ionescu/prezto/issues + diff --git a/modules/homebrew/init.zsh b/modules/homebrew/init.zsh new file mode 100644 index 0000000000..6f0299af99 --- /dev/null +++ b/modules/homebrew/init.zsh @@ -0,0 +1,25 @@ +# +# Defines Homebrew aliases. +# +# Authors: +# Sorin Ionescu +# + +# Return if requirements are not found. +if [[ "$OSTYPE" != darwin* ]]; then + return 1 +fi + +# +# Aliases +# + +alias brewc='brew cleanup' +alias brewC='brew cleanup --force' +alias brewi='brew install' +alias brewl='brew list' +alias brews='brew search' +alias brewu='brew upgrade' +alias brewU='brew update && brew upgrade' +alias brewx='brew remove' +