Class: Homebrew::Cmd::SearchCmd Private
- Inherits:
-
AbstractCommand
- Object
- AbstractCommand
- Homebrew::Cmd::SearchCmd
- Defined in:
- sorbet/rbi/dsl/homebrew/cmd/search_cmd.rbi,
cmd/search.rb
Overview
This class is part of a private API. This class may only be used in the Homebrew/brew repository. Third parties should avoid using this class if possible, as it may be removed or changed without warning.
DO NOT EDIT MANUALLY
This is an autogenerated file for dynamic methods in Homebrew::Cmd::SearchCmd
.
Please instead update this file by running bin/tapioca dsl Homebrew::Cmd::SearchCmd
.
Defined Under Namespace
Classes: Args
Constant Summary collapse
- PACKAGE_MANAGERS =
This constant is part of a private API. This constant may only be used in the Homebrew/brew repository. Third parties should avoid using this constant if possible, as it may be removed or changed without warning.
{ repology: ->(query) { "https://repology.org/projects/?search=#{query}" }, macports: ->(query) { "https://ports.macports.org/search/?q=#{query}" }, fink: ->(query) { "https://pdb.finkproject.org/pdb/browse.php?summary=#{query}" }, opensuse: ->(query) { "https://software.opensuse.org/search?q=#{query}" }, fedora: ->(query) { "https://packages.fedoraproject.org/search?query=#{query}" }, archlinux: ->(query) { "https://archlinux.org/packages/?q=#{query}" }, debian: lambda { |query| "https://packages.debian.org/search?keywords=#{query}&searchon=names&suite=all§ion=all" }, ubuntu: lambda { |query| "https://packages.ubuntu.com/search?keywords=#{query}&searchon=names&suite=all§ion=all" }, }.freeze
Instance Method Summary collapse
- #args ⇒ Homebrew::Cmd::SearchCmd::Args private
- #run ⇒ void private
Methods inherited from AbstractCommand
command, command_name, dev_cmd?, #initialize, parser
Constructor Details
This class inherits a constructor from Homebrew::AbstractCommand
Instance Method Details
#args ⇒ Homebrew::Cmd::SearchCmd::Args
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
9 |
# File 'sorbet/rbi/dsl/homebrew/cmd/search_cmd.rbi', line 9 def args; end |
#run ⇒ void
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
This method returns an undefined value.
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'cmd/search.rb', line 66 def run return if search_package_manager query = args.named.join(" ") string_or_regex = Search.query_regexp(query) if args.desc? if !args.eval_all? && !Homebrew::EnvConfig.eval_all? raise UsageError, "`brew search --desc` needs `--eval-all` passed or `HOMEBREW_EVAL_ALL` set!" end Search.search_descriptions(string_or_regex, args) elsif args.pull_request? search_pull_requests(query) else formulae, casks = Search.search_names(string_or_regex, args) print_results(formulae, casks, query) end puts "Use `brew desc` to list packages with a short description." if args.verbose? print_regex_help end |