Skip to content

Commit

Permalink
Merge pull request holman#225 from alias1/brew-bundle-autocomplete
Browse files Browse the repository at this point in the history
Add `brew bundle` completions
  • Loading branch information
holman committed Feb 15, 2016
2 parents f54ca5c + 20baec4 commit 28f6201
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions functions/_brew
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@ _1st_arguments=(
'log:git commit log for a formula'
'create:create a new formula'
'edit:edit a formula'
'bundle:install or upgrade all dependencies in a Brewfile'
)

local -a _bundle_arguments
_bundle_arguments=(
'dump:write all installed casks/formulae/taps into a Brewfile'
'cleanup:uninstall all dependencies not listed in a Brewfile'
'check:check if all dependencies are installed in a Brewfile'
)

local expl
Expand All @@ -55,11 +63,17 @@ case "$words[1]" in
if [[ "$state" == forms ]]; then
_brew_installed_formulae
_requested installed_formulae expl 'installed formulae' compadd -a installed_formulae
fi ;;
fi
;;
install|home|log|info)
_brew_all_formulae
_wanted formulae expl 'all formulae' compadd -a formulae ;;
_wanted formulae expl 'all formulae' compadd -a formulae
;;
remove|edit|xo)
_brew_installed_formulae
_wanted installed_formulae expl 'installed formulae' compadd -a installed_formulae ;;
_wanted installed_formulae expl 'installed formulae' compadd -a installed_formulae
;;
bundle)
_describe 'values' _bundle_arguments
;;
esac

0 comments on commit 28f6201

Please sign in to comment.