diff --git a/Library/Homebrew/cmd/--cache.rb b/Library/Homebrew/cmd/--cache.rb index 3ea31bdffa..8953b3d735 100644 --- a/Library/Homebrew/cmd/--cache.rb +++ b/Library/Homebrew/cmd/--cache.rb @@ -16,7 +16,7 @@ module Homebrew def __cache_args Homebrew::CLI::Parser.new do usage_banner <<~EOS - `--cache` [] [|] + `--cache` [] [|] [| ...] Display Homebrew's download cache. See also `HOMEBREW_CACHE`. diff --git a/Library/Homebrew/cmd/--caskroom.rb b/Library/Homebrew/cmd/--caskroom.rb index cf65933cb2..176e81582d 100644 --- a/Library/Homebrew/cmd/--caskroom.rb +++ b/Library/Homebrew/cmd/--caskroom.rb @@ -10,7 +10,7 @@ module Homebrew def __caskroom_args Homebrew::CLI::Parser.new do usage_banner <<~EOS - `--caskroom` [] + `--caskroom` [] [ ...] Display Homebrew's Caskroom path. diff --git a/Library/Homebrew/cmd/--cellar.rb b/Library/Homebrew/cmd/--cellar.rb index a6f88377a3..c2347436f6 100644 --- a/Library/Homebrew/cmd/--cellar.rb +++ b/Library/Homebrew/cmd/--cellar.rb @@ -9,7 +9,7 @@ module Homebrew def __cellar_args Homebrew::CLI::Parser.new do usage_banner <<~EOS - `--cellar` [] + `--cellar` [] [ ...] Display Homebrew's Cellar path. *Default:* `$(brew --prefix)/Cellar`, or if that directory doesn't exist, `$(brew --repository)/Cellar`. diff --git a/Library/Homebrew/cmd/--env.rb b/Library/Homebrew/cmd/--env.rb index 483a6c0b0d..0853b9393e 100644 --- a/Library/Homebrew/cmd/--env.rb +++ b/Library/Homebrew/cmd/--env.rb @@ -15,7 +15,7 @@ module Homebrew def __env_args Homebrew::CLI::Parser.new do usage_banner <<~EOS - `--env` [] [] + `--env` [] [] [ ...] Summarise Homebrew's build environment as a plain list. diff --git a/Library/Homebrew/cmd/--prefix.rb b/Library/Homebrew/cmd/--prefix.rb index dce8c6e8c1..11da33edb4 100644 --- a/Library/Homebrew/cmd/--prefix.rb +++ b/Library/Homebrew/cmd/--prefix.rb @@ -12,7 +12,7 @@ module Homebrew def __prefix_args Homebrew::CLI::Parser.new do usage_banner <<~EOS - `--prefix` [] + `--prefix` [] [ ...] Display Homebrew's install path. *Default:* diff --git a/Library/Homebrew/cmd/--repository.rb b/Library/Homebrew/cmd/--repository.rb index 4a301ae45d..d6dd2f8993 100644 --- a/Library/Homebrew/cmd/--repository.rb +++ b/Library/Homebrew/cmd/--repository.rb @@ -12,7 +12,7 @@ module Homebrew def __repository_args Homebrew::CLI::Parser.new do usage_banner <<~EOS - `--repository`, `--repo` [`/`] + `--repository`, `--repo` [`/`] [`/` ...] Display where Homebrew's `.git` directory is located. diff --git a/Library/Homebrew/cmd/cleanup.rb b/Library/Homebrew/cmd/cleanup.rb index 290bac0618..b9204b2050 100644 --- a/Library/Homebrew/cmd/cleanup.rb +++ b/Library/Homebrew/cmd/cleanup.rb @@ -14,7 +14,7 @@ module Homebrew Homebrew::CLI::Parser.new do days = Homebrew::EnvConfig::ENVS[:HOMEBREW_CLEANUP_MAX_AGE_DAYS][:default] usage_banner <<~EOS - `cleanup` [] [|] + `cleanup` [] [|] [| ...] Remove stale lock files and outdated downloads for all formulae and casks, and remove old versions of installed formulae. If arguments are specified, diff --git a/Library/Homebrew/cmd/deps.rb b/Library/Homebrew/cmd/deps.rb index 1ed15e5d3d..826d0b6de7 100644 --- a/Library/Homebrew/cmd/deps.rb +++ b/Library/Homebrew/cmd/deps.rb @@ -18,7 +18,7 @@ module Homebrew def deps_args Homebrew::CLI::Parser.new do usage_banner <<~EOS - `deps` [] [] + `deps` [] [] [ ...] Show dependencies for . Additional options specific to may be appended to the command. When given multiple formula arguments, diff --git a/Library/Homebrew/cmd/desc.rb b/Library/Homebrew/cmd/desc.rb index 6c4b9344fb..3f6b7a2630 100644 --- a/Library/Homebrew/cmd/desc.rb +++ b/Library/Homebrew/cmd/desc.rb @@ -17,7 +17,7 @@ module Homebrew def desc_args Homebrew::CLI::Parser.new do usage_banner <<~EOS - `desc` [] (|`/``/`|) + `desc` [] |`/``/`| [|`/``/`| ...] Display 's name and one-line description. Formula descriptions are cached; the cache is created on the @@ -35,7 +35,7 @@ module Homebrew conflicts "--search", "--name", "--description" - named_args :formula + named_args :formula, min: 1 end end @@ -51,14 +51,10 @@ module Homebrew end results = if search_type.nil? - raise FormulaUnspecifiedError if args.no_named? - desc = {} args.named.to_formulae.each { |f| desc[f.full_name] = f.desc } Descriptions.new(desc) else - raise UsageError, "this command requires a search term" if args.no_named? - query = args.named.join(" ") string_or_regex = query_regexp(query) CacheStoreDatabase.use(:descriptions) do |db| diff --git a/Library/Homebrew/cmd/fetch.rb b/Library/Homebrew/cmd/fetch.rb index 978d944d42..7ac471552a 100644 --- a/Library/Homebrew/cmd/fetch.rb +++ b/Library/Homebrew/cmd/fetch.rb @@ -17,7 +17,7 @@ module Homebrew def fetch_args Homebrew::CLI::Parser.new do usage_banner <<~EOS - `fetch` [] + `fetch` [] | [| ...] Download a bottle (if available) or source packages for e and binaries for s. For files, also print SHA-256 checksums. diff --git a/Library/Homebrew/cmd/home.rb b/Library/Homebrew/cmd/home.rb index 58d7c1126a..6957dba195 100644 --- a/Library/Homebrew/cmd/home.rb +++ b/Library/Homebrew/cmd/home.rb @@ -13,7 +13,7 @@ module Homebrew def home_args Homebrew::CLI::Parser.new do usage_banner <<~EOS - `home` [|] + `home` [|] [| ...] Open a or 's homepage in a browser, or open Homebrew's own homepage if no argument is provided. diff --git a/Library/Homebrew/cmd/info.rb b/Library/Homebrew/cmd/info.rb index 7956ac39f8..159141cafb 100644 --- a/Library/Homebrew/cmd/info.rb +++ b/Library/Homebrew/cmd/info.rb @@ -25,7 +25,7 @@ module Homebrew def info_args Homebrew::CLI::Parser.new do usage_banner <<~EOS - `info` [] [|] + `info` [] [|] [| ...] Display brief statistics for your Homebrew installation. diff --git a/Library/Homebrew/cmd/install.rb b/Library/Homebrew/cmd/install.rb index 06fc5e2504..734dc98ae2 100644 --- a/Library/Homebrew/cmd/install.rb +++ b/Library/Homebrew/cmd/install.rb @@ -24,7 +24,7 @@ module Homebrew def install_args Homebrew::CLI::Parser.new do usage_banner <<~EOS - `install` [] | + `install` [] | [| ...] Install a or . Additional options specific to a may be appended to the command. diff --git a/Library/Homebrew/cmd/link.rb b/Library/Homebrew/cmd/link.rb index 29365dd003..94f7021a8a 100644 --- a/Library/Homebrew/cmd/link.rb +++ b/Library/Homebrew/cmd/link.rb @@ -15,7 +15,7 @@ module Homebrew def link_args Homebrew::CLI::Parser.new do usage_banner <<~EOS - `link`, `ln` [] + `link`, `ln` [] [ ...] Symlink all of 's installed files into Homebrew's prefix. This is done automatically when you install formulae but can be useful for DIY diff --git a/Library/Homebrew/cmd/list.rb b/Library/Homebrew/cmd/list.rb index 57446422e6..fcca596332 100644 --- a/Library/Homebrew/cmd/list.rb +++ b/Library/Homebrew/cmd/list.rb @@ -15,7 +15,7 @@ module Homebrew def list_args Homebrew::CLI::Parser.new do usage_banner <<~EOS - `list`, `ls` [] [|] + `list`, `ls` [] [|] [| ...] List all installed formulae and casks. diff --git a/Library/Homebrew/cmd/migrate.rb b/Library/Homebrew/cmd/migrate.rb index e2455dc6b5..c7adbacef1 100644 --- a/Library/Homebrew/cmd/migrate.rb +++ b/Library/Homebrew/cmd/migrate.rb @@ -13,7 +13,7 @@ module Homebrew def migrate_args Homebrew::CLI::Parser.new do usage_banner <<~EOS - `migrate` [] + `migrate` [] [ ...] Migrate renamed packages to new names, where are old names of packages. diff --git a/Library/Homebrew/cmd/missing.rb b/Library/Homebrew/cmd/missing.rb index 1b0f2ef1d6..c082374f05 100644 --- a/Library/Homebrew/cmd/missing.rb +++ b/Library/Homebrew/cmd/missing.rb @@ -15,7 +15,7 @@ module Homebrew def missing_args Homebrew::CLI::Parser.new do usage_banner <<~EOS - `missing` [] [] + `missing` [] [] [ ...] Check the given kegs for missing dependencies. If no are provided, check all kegs. Will exit with a non-zero status if any kegs are found diff --git a/Library/Homebrew/cmd/options.rb b/Library/Homebrew/cmd/options.rb index f87a2f81ec..bf7238d47e 100644 --- a/Library/Homebrew/cmd/options.rb +++ b/Library/Homebrew/cmd/options.rb @@ -15,7 +15,7 @@ module Homebrew def options_args Homebrew::CLI::Parser.new do usage_banner <<~EOS - `options` [] [] + `options` [] [] [ ...] Show install options specific to . EOS diff --git a/Library/Homebrew/cmd/outdated.rb b/Library/Homebrew/cmd/outdated.rb index 112fcf0cd4..af5c94eace 100644 --- a/Library/Homebrew/cmd/outdated.rb +++ b/Library/Homebrew/cmd/outdated.rb @@ -16,7 +16,7 @@ module Homebrew def outdated_args Homebrew::CLI::Parser.new do usage_banner <<~EOS - `outdated` [] [|] + `outdated` [] [|] [| ...] List installed casks and formulae that have an updated version available. By default, version information is displayed in interactive shells, and suppressed otherwise. diff --git a/Library/Homebrew/cmd/pin.rb b/Library/Homebrew/cmd/pin.rb index c9367ea006..be6749c7fa 100644 --- a/Library/Homebrew/cmd/pin.rb +++ b/Library/Homebrew/cmd/pin.rb @@ -13,7 +13,7 @@ module Homebrew def pin_args Homebrew::CLI::Parser.new do usage_banner <<~EOS - `pin` + `pin` [ ...] Pin the specified , preventing them from being upgraded when issuing the `brew upgrade` command. See also `unpin`. diff --git a/Library/Homebrew/cmd/postinstall.rb b/Library/Homebrew/cmd/postinstall.rb index a1d5cb2ff7..22577d343a 100644 --- a/Library/Homebrew/cmd/postinstall.rb +++ b/Library/Homebrew/cmd/postinstall.rb @@ -14,7 +14,7 @@ module Homebrew def postinstall_args Homebrew::CLI::Parser.new do usage_banner <<~EOS - `postinstall` + `postinstall` [ ...] Rerun the post-install steps for . EOS diff --git a/Library/Homebrew/cmd/readall.rb b/Library/Homebrew/cmd/readall.rb index 0ee287edef..9b6b8edf06 100644 --- a/Library/Homebrew/cmd/readall.rb +++ b/Library/Homebrew/cmd/readall.rb @@ -13,7 +13,7 @@ module Homebrew def readall_args Homebrew::CLI::Parser.new do usage_banner <<~EOS - `readall` [] [] + `readall` [] [] [ ...] Import all items from the specified , or from all installed taps if none is provided. This can be useful for debugging issues across all items when making diff --git a/Library/Homebrew/cmd/reinstall.rb b/Library/Homebrew/cmd/reinstall.rb index 8ac00a61f4..1ba22c52ce 100644 --- a/Library/Homebrew/cmd/reinstall.rb +++ b/Library/Homebrew/cmd/reinstall.rb @@ -22,7 +22,7 @@ module Homebrew def reinstall_args Homebrew::CLI::Parser.new do usage_banner <<~EOS - `reinstall` [] | + `reinstall` [] | [| ...] Uninstall and then reinstall a or using the same options it was originally installed with, plus any appended options specific to a . diff --git a/Library/Homebrew/cmd/search.rb b/Library/Homebrew/cmd/search.rb index 0b08fa14ea..aa4625e9df 100644 --- a/Library/Homebrew/cmd/search.rb +++ b/Library/Homebrew/cmd/search.rb @@ -31,7 +31,7 @@ module Homebrew def search_args Homebrew::CLI::Parser.new do usage_banner <<~EOS - `search` [] [|`/``/`] + `search` [] [|`/``/`] [|`/``/` ...] Perform a substring search of cask tokens and formula names for . If is flanked by slashes, it is interpreted as a regular expression. diff --git a/Library/Homebrew/cmd/switch.rb b/Library/Homebrew/cmd/switch.rb index d7b5f5e9cf..e9d3b141c8 100644 --- a/Library/Homebrew/cmd/switch.rb +++ b/Library/Homebrew/cmd/switch.rb @@ -19,7 +19,7 @@ module Homebrew Symlink all of the specified of 's installation into Homebrew's prefix. EOS - named 2 + named_args number: 2 hide_from_man_page! end end diff --git a/Library/Homebrew/cmd/tap-info.rb b/Library/Homebrew/cmd/tap-info.rb index 29bff4ddf0..008287496b 100644 --- a/Library/Homebrew/cmd/tap-info.rb +++ b/Library/Homebrew/cmd/tap-info.rb @@ -12,7 +12,7 @@ module Homebrew def tap_info_args Homebrew::CLI::Parser.new do usage_banner <<~EOS - `tap-info` [] [] + `tap-info` [] [] [ ...] Show detailed information about one or more s. diff --git a/Library/Homebrew/cmd/uninstall.rb b/Library/Homebrew/cmd/uninstall.rb index 5d76f42b01..0c730c810a 100644 --- a/Library/Homebrew/cmd/uninstall.rb +++ b/Library/Homebrew/cmd/uninstall.rb @@ -19,7 +19,7 @@ module Homebrew def uninstall_args Homebrew::CLI::Parser.new do usage_banner <<~EOS - `uninstall`, `rm`, `remove` [] | + `uninstall`, `rm`, `remove` [] | [| ...] Uninstall a or . EOS diff --git a/Library/Homebrew/cmd/unlink.rb b/Library/Homebrew/cmd/unlink.rb index 02bbbab6e8..cd5f7f2070 100644 --- a/Library/Homebrew/cmd/unlink.rb +++ b/Library/Homebrew/cmd/unlink.rb @@ -14,7 +14,7 @@ module Homebrew def unlink_args Homebrew::CLI::Parser.new do usage_banner <<~EOS - `unlink` [] + `unlink` [] [ ...] Remove symlinks for from Homebrew's prefix. This can be useful for temporarily disabling a formula: diff --git a/Library/Homebrew/cmd/unpin.rb b/Library/Homebrew/cmd/unpin.rb index f763a80e1b..e4dbbbe3ac 100644 --- a/Library/Homebrew/cmd/unpin.rb +++ b/Library/Homebrew/cmd/unpin.rb @@ -13,7 +13,7 @@ module Homebrew def unpin_args Homebrew::CLI::Parser.new do usage_banner <<~EOS - `unpin` + `unpin` [ ...] Unpin , allowing them to be upgraded by `brew upgrade` . See also `pin`. diff --git a/Library/Homebrew/cmd/untap.rb b/Library/Homebrew/cmd/untap.rb index 1bdb6b3f5b..2fd28d9000 100644 --- a/Library/Homebrew/cmd/untap.rb +++ b/Library/Homebrew/cmd/untap.rb @@ -12,7 +12,7 @@ module Homebrew def untap_args Homebrew::CLI::Parser.new do usage_banner <<~EOS - `untap` + `untap` [ ...] Remove a tapped formula repository. EOS diff --git a/Library/Homebrew/cmd/update-reset.sh b/Library/Homebrew/cmd/update-reset.sh index 9cccaa35fb..d652f6d3ed 100644 --- a/Library/Homebrew/cmd/update-reset.sh +++ b/Library/Homebrew/cmd/update-reset.sh @@ -1,4 +1,4 @@ -#: * `update-reset` [] +#: * `update-reset` [] [ ...] #: #: Fetch and reset Homebrew and all tap repositories (or any specified ) using `git`(1) to their latest `origin/master`. #: diff --git a/Library/Homebrew/cmd/upgrade.rb b/Library/Homebrew/cmd/upgrade.rb index 038083fcff..f4f2db53ae 100644 --- a/Library/Homebrew/cmd/upgrade.rb +++ b/Library/Homebrew/cmd/upgrade.rb @@ -18,7 +18,7 @@ module Homebrew def upgrade_args Homebrew::CLI::Parser.new do usage_banner <<~EOS - `upgrade` [] [|] + `upgrade` [] [|] [| ...] Upgrade outdated casks and outdated, unpinned formulae using the same options they were originally installed with, plus any appended brew formula options. If or are specified, diff --git a/Library/Homebrew/cmd/uses.rb b/Library/Homebrew/cmd/uses.rb index 7ad2e3c6a4..1c4214d1b7 100644 --- a/Library/Homebrew/cmd/uses.rb +++ b/Library/Homebrew/cmd/uses.rb @@ -21,7 +21,7 @@ module Homebrew def uses_args Homebrew::CLI::Parser.new do usage_banner <<~EOS - `uses` [] + `uses` [] [ ...] Show formulae and casks that specify as a dependency (i.e. show dependents of ). When given multiple formula arguments, show the intersection