From a4590f394e71384bb7acd780bc51ff184d8f2e1e Mon Sep 17 00:00:00 2001 From: EricFromCanada Date: Mon, 25 Apr 2022 22:18:37 -0400 Subject: [PATCH] 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. --- Library/Homebrew/extend/os/mac/search.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/extend/os/mac/search.rb b/Library/Homebrew/extend/os/mac/search.rb index b937f64db4..6e5e6df789 100644 --- a/Library/Homebrew/extend/os/mac/search.rb +++ b/Library/Homebrew/extend/os/mac/search.rb @@ -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)