search: drop Homebrew cask tap names from list

Results in searching a list of tokens from official Homebrew cask taps and fully-qualified tokens from other taps, matching the list when searching formulae.
This commit is contained in:
EricFromCanada 2022-04-25 22:18:37 -04:00
parent 96e87965b7
commit a4590f394e
No known key found for this signature in database
GPG Key ID: 179D9CDDDB814168

View File

@ -29,7 +29,9 @@ module Homebrew
end
end
cask_tokens = Tap.flat_map(&:cask_tokens)
cask_tokens = Tap.flat_map(&:cask_tokens).map do |c|
c.sub(%r{^homebrew/cask.*/}, "")
end
results = cask_tokens.extend(Searchable)
.search(string_or_regex)