From 49b37466d98495fc3f6178c4e27823c175f14ae3 Mon Sep 17 00:00:00 2001 From: Baptiste Fontaine Date: Tue, 25 Aug 2015 11:31:09 +0200 Subject: [PATCH] bash completion for tap-pin/tap-unpin added Closes Homebrew/homebrew#43259. Signed-off-by: Baptiste Fontaine --- Library/Contributions/brew_bash_completion.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Library/Contributions/brew_bash_completion.sh b/Library/Contributions/brew_bash_completion.sh index 1b3f998145..5c29921263 100644 --- a/Library/Contributions/brew_bash_completion.sh +++ b/Library/Contributions/brew_bash_completion.sh @@ -131,12 +131,17 @@ __brew_complete_tapped () __brewcomp "$taps" } +_brew_tap_unpin () +{ + __brewcomp "$(brew tap --list-pinned)" +} + _brew_complete_tap () { local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in --*) - __brewcomp "--repair" + __brewcomp "--repair --list-official --list-pinned" return ;; esac @@ -619,11 +624,12 @@ _brew () switch) _brew_switch ;; tap) _brew_complete_tap ;; tap-readme) _brew_tap_readme ;; + tap-unpin) _brew_tap_unpin ;; tests) _brew_tests ;; uninstall|remove|rm) _brew_uninstall ;; unpack) _brew_unpack ;; unpin) __brew_complete_formulae ;; - untap|tap-info) __brew_complete_tapped ;; + untap|tap-info|tap-pin) __brew_complete_tapped ;; update) _brew_update ;; upgrade) _brew_upgrade ;; uses) _brew_uses ;;