diff options
| author | Baptiste Fontaine | 2015-08-03 20:39:00 +0200 |
|---|---|---|
| committer | Baptiste Fontaine | 2015-08-03 23:37:00 +0200 |
| commit | 3a733cad09ea45cb5f4f6fcf31afccb7f0333140 (patch) | |
| tree | e55f8395b633b29c9786feded929c3da69959bec /Library | |
| parent | b2c0ff398524adb133a75030e0504b1704b1db28 (diff) | |
| download | brew-3a733cad09ea45cb5f4f6fcf31afccb7f0333140.tar.bz2 | |
shell completion of official taps added to 'brew tap'
Closes Homebrew/homebrew#42421.
Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Contributions/brew_bash_completion.sh | 1 | ||||
| -rw-r--r-- | Library/Contributions/brew_zsh_completion.zsh | 9 | ||||
| -rw-r--r-- | Library/Homebrew/cmd/tap.rb | 3 |
3 files changed, 12 insertions, 1 deletions
diff --git a/Library/Contributions/brew_bash_completion.sh b/Library/Contributions/brew_bash_completion.sh index 54413357b..1b3f99814 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 186ebb442..af5c86dab 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 c7fb0733e..35e12a120 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] |
