diff options
| author | Jack Nagel | 2014-04-24 21:38:47 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-04-24 21:42:15 -0500 |
| commit | 99c275d03b3e536ed315c67ef24ef62df15f0f40 (patch) | |
| tree | 7c9d8be3a60fd0fe950e6abbf40bc6e2ca205dd6 | |
| parent | c466b20591df86f9972b42d5f3e2ce9ab2cfdd34 (diff) | |
| download | brew-99c275d03b3e536ed315c67ef24ef62df15f0f40.tar.bz2 | |
Remove slow tab completion for `brew tap`
This requires hitting the network, which makes the first invocation
slow. The results are inaccurate as it only pulls down the first page of
results. It is also prone to false-positives.
A better implementation is welcome, but in the years since I wrote this
code I can't think of a single time where I found it useful.
| -rw-r--r-- | Library/Contributions/brew_bash_completion.sh | 10 | ||||
| -rw-r--r-- | Library/Contributions/brew_fish_completion.fish | 5 | ||||
| -rwxr-xr-x | Library/Contributions/cmd/brew-ls-taps.rb | 11 |
3 files changed, 0 insertions, 26 deletions
diff --git a/Library/Contributions/brew_bash_completion.sh b/Library/Contributions/brew_bash_completion.sh index 54ce7fe09..ee2bcbed3 100644 --- a/Library/Contributions/brew_bash_completion.sh +++ b/Library/Contributions/brew_bash_completion.sh @@ -133,16 +133,6 @@ _brew_complete_tap () return ;; esac - __brew_complete_taps -} - -__brew_complete_taps () -{ - if [[ -z "$__brew_cached_taps" ]]; then - __brew_cached_taps="$(brew ls-taps)" - fi - - __brewcomp "$__brew_cached_taps" } _brew_bottle () diff --git a/Library/Contributions/brew_fish_completion.fish b/Library/Contributions/brew_fish_completion.fish index e0c6e3262..f473be1e0 100644 --- a/Library/Contributions/brew_fish_completion.fish +++ b/Library/Contributions/brew_fish_completion.fish @@ -37,11 +37,6 @@ function __fish_complete_brew_argument return 0 end - if contains -- $cmd tap - brew ls-taps - return 0 - end - if contains -- $cmd untap ls (brew --repository)/Library/Taps 2>/dev/null | sed 's/-/\//g' return 0 diff --git a/Library/Contributions/cmd/brew-ls-taps.rb b/Library/Contributions/cmd/brew-ls-taps.rb deleted file mode 100755 index aa6909447..000000000 --- a/Library/Contributions/cmd/brew-ls-taps.rb +++ /dev/null @@ -1,11 +0,0 @@ -require "utils/json" - -GitHub.open("https://api.github.com/search/repositories?q=homebrew+in:name&sort=stars&per_page=100") do |json| - json["items"].each do |repo| - if repo["name"] =~ /^homebrew-(\S+)$/ - user = repo["owner"]["login"] - user = user.downcase if user == "Homebrew" - puts "#{user}/#{$1}" - end - end -end |
