From ba614a9ffbbe884417b8efa9a711493dec5e8989 Mon Sep 17 00:00:00 2001 From: Lance Speelmon Date: Mon, 8 Apr 2013 13:49:38 -0700 Subject: [PATCH] Added a new brew module to mimic the MacPorts port module. --- modules/brew/brew/README.md | 23 +++++++++++++++++++++++ modules/brew/brew/init.zsh | 22 ++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 modules/brew/brew/README.md create mode 100644 modules/brew/brew/init.zsh diff --git a/modules/brew/brew/README.md b/modules/brew/brew/README.md new file mode 100644 index 00000000..0f150212 --- /dev/null +++ b/modules/brew/brew/README.md @@ -0,0 +1,23 @@ +Brew +==== + +Defines Brew aliases and adds Brew directories to path variables. + +Aliases +------- + + - `brewc` cleans the files used to build brews. + - `brewi` installs a brew. + - `brews` searches for a brew. + - `brewu` upgrades a brew. + - `brewU` upgrades Brew, the brews collection, and outdated brews. + - `brewx` uninstalls a brew. + +Authors +------- + +*The authors of this module should be contacted via the [issue tracker][1].* + + - [Lance Speelmon](https://github.com/lancespeelmon) + +[1]: https://github.com/sorin-ionescu/prezto/issues diff --git a/modules/brew/brew/init.zsh b/modules/brew/brew/init.zsh new file mode 100644 index 00000000..db040a14 --- /dev/null +++ b/modules/brew/brew/init.zsh @@ -0,0 +1,22 @@ +# +# Defines Brew aliases and adds Brew directories to path variables. +# +# Authors: +# Lance Speelmon +# + +# Return if requirements are not found. +if [[ "$OSTYPE" != darwin* ]]; then + return 1 +fi + +# +# Aliases +# + +alias brewc='brew cleanup' +alias brewi='brew install' +alias brews='brew search' +alias brewU='brew update && brew upgrade' +alias brewu='brew upgrade' +alias brewx='brew remove'