diff options
| author | Chayoung You | 2016-02-07 22:09:46 +0900 |
|---|---|---|
| committer | Martin Afanasjew | 2016-02-11 12:08:31 +0100 |
| commit | e6f946d24ee805e519f8ae92fdc4564c74bc444f (patch) | |
| tree | e1ee9518c3e8c19135bacedddb6baa5c200d69cf /Library | |
| parent | 6410f9433dc753062e80994a5194ffb1c8c15e19 (diff) | |
| download | brew-e6f946d24ee805e519f8ae92fdc4564c74bc444f.tar.bz2 | |
Add `--cleanup` for completions of brew upgrade
Closes Homebrew/homebrew#48946.
Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Contributions/brew_zsh_completion.zsh | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Library/Contributions/brew_zsh_completion.zsh b/Library/Contributions/brew_zsh_completion.zsh index 085ffc821..d2de5f65f 100644 --- a/Library/Contributions/brew_zsh_completion.zsh +++ b/Library/Contributions/brew_zsh_completion.zsh @@ -138,6 +138,12 @@ case "$words[1]" in _brew_pinned_taps _wanted pinned_taps expl 'pinned taps' compadd -a pinned_taps ;; upgrade) - _brew_outdated_formulae - _wanted outdated_formulae expl 'outdated formulae' compadd -a outdated_formulae ;; + _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 + fi ;; esac |
