This commit is contained in:
Austin Tajiri 2014-02-05 16:18:47 -08:00
commit 9ecfc3cf81

View file

@ -11,6 +11,10 @@ _brew_installed_formulae() {
installed_formulae=(`brew list`)
}
_brew_tapped_repositories() {
tapped_repositories=(`brew tap`)
}
local -a _1st_arguments
_1st_arguments=(
'cat:display formula file for a formula'
@ -33,7 +37,9 @@ _1st_arguments=(
'remove:remove a formula'
'search:search for a formula (/regex/ or string)'
'server:start a local web app that lets you browse formulae (requires Sinatra)'
'tap:tap a new source of formulae on Github'
'unlink:unlink a formula'
'untap:remove a tapped repository'
'update:freshen up links'
'upgrade:upgrade outdated formulae'
'uses:show formulas which depend on a formula'
@ -41,7 +47,7 @@ _1st_arguments=(
)
local expl
local -a formulae installed_formulae
local -a formulae installed_formulae tapped_repositories
_arguments \
'(-v)-v[verbose]' \
@ -80,4 +86,7 @@ case "$words[1]" in
reinstall|remove|rm|uninstall|unlink|cleanup|link|ln)
_brew_installed_formulae
_wanted installed_formulae expl 'installed formulae' compadd -a installed_formulae ;;
untap)
_brew_tapped_repositories
_wanted tapped_repositories expl 'tapped repositories' compadd -a tapped_repositories;;
esac