From d2b177ea2fce1d4e1548cb964439fd3bcd7ea65e Mon Sep 17 00:00:00 2001 From: Ryan Rotter Date: Sat, 29 Jun 2024 15:36:51 -0400 Subject: [PATCH] add cask names to search hash --- Library/Homebrew/search.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/search.rb b/Library/Homebrew/search.rb index 407f091352d6b4..38bb22437ace6b 100644 --- a/Library/Homebrew/search.rb +++ b/Library/Homebrew/search.rb @@ -53,7 +53,8 @@ def self.search_descriptions(string_or_regex, args, search_type: :desc) opoo "#{unofficial} additional cask(s) in third party repositories were not searched. " \ "To search all casks repeat this search with the flag `--eval-all`." end - descriptions = Homebrew::API::Cask.all_casks.transform_values { |data| data["desc"] } + # descriptions = Homebrew::API::Cask.all_casks.transform_values { |data| data["desc"] } + descriptions = Homebrew::API::Cask.all_casks.transform_values { |c| [c["name"].join(", "), c["desc"]] } Descriptions.search(string_or_regex, search_type, descriptions, eval_all, cache_store_hash: true).print end end