Add --cleanup for completions of brew upgrade

Closes Homebrew/homebrew#48946.

Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
This commit is contained in:
Chayoung You 2016-02-07 22:09:46 +09:00 committed by Martin Afanasjew
parent 6410f9433d
commit e6f946d24e

View File

@ -138,6 +138,12 @@ case "$words[1]" in
_brew_pinned_taps
_wanted pinned_taps expl 'pinned taps' compadd -a pinned_taps ;;
upgrade)
_arguments \
'(--cleanup)--cleanup[remove previously installed formula version(s)]' \
'1: :->forms' && return 0
if [[ "$state" == forms ]]; then
_brew_outdated_formulae
_wanted outdated_formulae expl 'outdated formulae' compadd -a outdated_formulae ;;
_wanted outdated_formulae expl 'outdated formulae' compadd -a outdated_formulae
fi ;;
esac