From 1da2855c0b1d884d18944307bdbbe2b64c4dd47d Mon Sep 17 00:00:00 2001 From: Xu Cheng Date: Fri, 21 Aug 2015 12:39:50 +0800 Subject: [PATCH] zsh-completion: add tap-(un)pin Closes Homebrew/homebrew#43146. Signed-off-by: Xu Cheng --- Library/Contributions/brew_zsh_completion.zsh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Library/Contributions/brew_zsh_completion.zsh b/Library/Contributions/brew_zsh_completion.zsh index f78edaa299..dec63b84de 100644 --- a/Library/Contributions/brew_zsh_completion.zsh +++ b/Library/Contributions/brew_zsh_completion.zsh @@ -23,6 +23,10 @@ _brew_official_taps() { official_taps=(`brew tap --list-official`) } +_brew_pinned_taps() { + pinned_taps=(`brew tap --list-pinned`) +} + _brew_outdated_formulae() { outdated_formulae=(`brew outdated`) } @@ -59,6 +63,8 @@ _1st_arguments=( 'switch:switch between different versions of a formula' 'tap:tap a new formula repository from GitHub, or list existing taps' 'tap-info:information about a tap' + 'tap-pin:pin a tap' + 'tap-unpin:unpin a tap' 'test-bot:test a formula and build a bottle' 'uninstall:uninstall a formula' 'unlink:unlink a formula' @@ -110,12 +116,15 @@ case "$words[1]" in _arguments \ '(--macports)--macports[search the macports repository]' \ '(--fink)--fink[search the fink repository]' ;; - untap|tap-info) + untap|tap-info|tap-pin) _brew_installed_taps _wanted installed_taps expl 'installed taps' compadd -a installed_taps ;; tap) _brew_official_taps _wanted official_taps expl 'official taps' compadd -a official_taps ;; + tap-unpin) + _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 ;;