diff --git a/Library/Contributions/brew_bash_completion.sh b/Library/Contributions/brew_bash_completion.sh index 54413357b7..1b3f998145 100644 --- a/Library/Contributions/brew_bash_completion.sh +++ b/Library/Contributions/brew_bash_completion.sh @@ -140,6 +140,7 @@ _brew_complete_tap () return ;; esac + __brewcomp "$(brew tap --list-official)" } _brew_bottle () diff --git a/Library/Contributions/brew_zsh_completion.zsh b/Library/Contributions/brew_zsh_completion.zsh index 186ebb4427..af5c86dabc 100644 --- a/Library/Contributions/brew_zsh_completion.zsh +++ b/Library/Contributions/brew_zsh_completion.zsh @@ -18,6 +18,10 @@ _brew_installed_taps() { installed_taps=(`brew tap`) } +_brew_official_taps() { + official_taps=(`brew tap --list-official`) +} + _brew_outdated_formulae() { outdated_formulae=(`brew outdated`) } @@ -58,7 +62,7 @@ _1st_arguments=( ) local expl -local -a formulae installed_formulae installed_taps outdated_formulae +local -a formulae installed_formulae installed_taps official_taps outdated_formulae _arguments \ '(-v)-v[verbose]' \ @@ -100,6 +104,9 @@ case "$words[1]" in untap|tap-info) _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 ;; upgrade) _brew_outdated_formulae _wanted outdated_formulae expl 'outdated formulae' compadd -a outdated_formulae ;; diff --git a/Library/Homebrew/cmd/tap.rb b/Library/Homebrew/cmd/tap.rb index c7fb0733e5..35e12a1209 100644 --- a/Library/Homebrew/cmd/tap.rb +++ b/Library/Homebrew/cmd/tap.rb @@ -6,6 +6,9 @@ module Homebrew puts Tap.names elsif ARGV.first == "--repair" migrate_taps :force => true + elsif ARGV.first == "--list-official" + require "official_taps" + puts OFFICIAL_TAPS.map { |t| "homebrew/#{t}" } * "\n" else user, repo = tap_args clone_target = ARGV.named[1]