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.
This commit is contained in:
parent
c466b20591
commit
99c275d03b
@ -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 ()
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
Loading…
x
Reference in New Issue
Block a user