dev-cmd: indicate multiple named args in usage banner

This commit is contained in:
Dawid Dziurla 2021-01-15 13:04:07 +01:00
parent 332372469f
commit cf654da251
No known key found for this signature in database
GPG Key ID: 7B6D8368172E9B0B
17 changed files with 19 additions and 17 deletions

View File

@ -50,7 +50,7 @@ module Homebrew
def bottle_args def bottle_args
Homebrew::CLI::Parser.new do Homebrew::CLI::Parser.new do
usage_banner <<~EOS usage_banner <<~EOS
`bottle` [<options>] <formula> `bottle` [<options>] <formula> [<formula> ...]
Generate a bottle (binary package) from a formula that was installed with Generate a bottle (binary package) from a formula that was installed with
`--build-bottle`. `--build-bottle`.

View File

@ -18,7 +18,7 @@ module Homebrew
def self.bump_unversioned_casks_args def self.bump_unversioned_casks_args
Homebrew::CLI::Parser.new do Homebrew::CLI::Parser.new do
usage_banner <<~EOS usage_banner <<~EOS
`bump-unversioned-casks` [<options>] [<cask>|<tap>] `bump-unversioned-casks` [<options>] <cask>|<tap> [<cask>|<tap> ...]
Check all casks with unversioned URLs in a given <tap> for updates. Check all casks with unversioned URLs in a given <tap> for updates.
EOS EOS

View File

@ -12,7 +12,7 @@ module Homebrew
def bump_args def bump_args
Homebrew::CLI::Parser.new do Homebrew::CLI::Parser.new do
usage_banner <<~EOS usage_banner <<~EOS
`bump` [<options>] [<formula>] `bump` [<options>] [<formula>] [<formula> ...]
Display out-of-date brew formulae and the latest version available. Display out-of-date brew formulae and the latest version available.
Also displays whether a pull request has been opened with the URL. Also displays whether a pull request has been opened with the URL.

View File

@ -13,7 +13,7 @@ module Homebrew
def command_args def command_args
Homebrew::CLI::Parser.new do Homebrew::CLI::Parser.new do
usage_banner <<~EOS usage_banner <<~EOS
`command` <cmd> `command` <cmd> [<cmd> ...]
Display the path to the file being used when invoking `brew` <cmd>. Display the path to the file being used when invoking `brew` <cmd>.
EOS EOS

View File

@ -13,7 +13,7 @@ module Homebrew
def edit_args def edit_args
Homebrew::CLI::Parser.new do Homebrew::CLI::Parser.new do
usage_banner <<~EOS usage_banner <<~EOS
`edit` [<formula>|<cask>] `edit` [<formula>|<cask>] [<formula>|<cask> ...]
Open a <formula> or <cask> in the editor set by `EDITOR` or `HOMEBREW_EDITOR`, Open a <formula> or <cask> in the editor set by `EDITOR` or `HOMEBREW_EDITOR`,
or open the Homebrew repository for editing if no formula is provided. or open the Homebrew repository for editing if no formula is provided.

View File

@ -13,7 +13,7 @@ module Homebrew
def formula_args def formula_args
Homebrew::CLI::Parser.new do Homebrew::CLI::Parser.new do
usage_banner <<~EOS usage_banner <<~EOS
`formula` <formula> `formula` <formula> [<formula> ...]
Display the path where <formula> is located. Display the path where <formula> is located.
EOS EOS

View File

@ -34,6 +34,8 @@ module Homebrew
switch "--pry", switch "--pry",
env: :pry, env: :pry,
description: "Use Pry instead of IRB. Implied if `HOMEBREW_PRY` is set." description: "Use Pry instead of IRB. Implied if `HOMEBREW_PRY` is set."
named_args :none
end end
end end

View File

@ -14,7 +14,7 @@ module Homebrew
def linkage_args def linkage_args
Homebrew::CLI::Parser.new do Homebrew::CLI::Parser.new do
usage_banner <<~EOS usage_banner <<~EOS
`linkage` [<options>] [<formula>] `linkage` [<options>] [<formula>] [<formula> ...]
Check the library links from the given <formula> kegs. If no <formula> are Check the library links from the given <formula> kegs. If no <formula> are
provided, check all kegs. Raises an error if run on uninstalled formulae. provided, check all kegs. Raises an error if run on uninstalled formulae.

View File

@ -20,7 +20,7 @@ module Homebrew
def livecheck_args def livecheck_args
Homebrew::CLI::Parser.new do Homebrew::CLI::Parser.new do
usage_banner <<~EOS usage_banner <<~EOS
`livecheck` [<formulae>|<casks>] `livecheck` [<formula>|<cask>] [<formula>|<cask> ...]
Check for newer versions of formulae and/or casks from upstream. Check for newer versions of formulae and/or casks from upstream.

View File

@ -13,7 +13,7 @@ module Homebrew
def mirror_args def mirror_args
Homebrew::CLI::Parser.new do Homebrew::CLI::Parser.new do
usage_banner <<~EOS usage_banner <<~EOS
`mirror` <formula> `mirror` <formula> [<formula> ...]
Reupload the stable URL of a formula to Bintray for use as a mirror. Reupload the stable URL of a formula to Bintray for use as a mirror.
EOS EOS

View File

@ -29,7 +29,7 @@ module Homebrew
flag "--workflow=", flag "--workflow=",
description: "Target workflow filename (default: `publish-commit-bottles.yml`)." description: "Target workflow filename (default: `publish-commit-bottles.yml`)."
named_args number: 1 named_args min: 1
end end
end end

View File

@ -71,7 +71,7 @@ module Homebrew
conflicts "--clean", "--autosquash" conflicts "--clean", "--autosquash"
named_args number: 1 named_args min: 1
end end
end end

View File

@ -15,7 +15,7 @@ module Homebrew
def style_args def style_args
Homebrew::CLI::Parser.new do Homebrew::CLI::Parser.new do
usage_banner <<~EOS usage_banner <<~EOS
`style` [<options>] [<file>|<tap>|<formula>] `style` [<options>] [<file>|<tap>|<formula>|<cask>] [<file>|<tap>|<formula>|<cask> ...]
Check formulae or files for conformance to Homebrew style guidelines. Check formulae or files for conformance to Homebrew style guidelines.

View File

@ -15,7 +15,7 @@ module Homebrew
def test_args def test_args
Homebrew::CLI::Parser.new do Homebrew::CLI::Parser.new do
usage_banner <<~EOS usage_banner <<~EOS
`test` [<options>] <formula> `test` [<options>] <formula> [<formula> ...]
Run the test method provided by an installed formula. Run the test method provided by an installed formula.
There is no standard output or return code, but generally it should notify the There is no standard output or return code, but generally it should notify the

View File

@ -13,7 +13,7 @@ module Homebrew
def unbottled_args def unbottled_args
Homebrew::CLI::Parser.new do Homebrew::CLI::Parser.new do
usage_banner <<~EOS usage_banner <<~EOS
`unbottled` [<formula>] `unbottled` [<formula>] [<formula> ...]
Outputs the unbottled dependents of formulae. Outputs the unbottled dependents of formulae.
EOS EOS

View File

@ -14,7 +14,7 @@ module Homebrew
def unpack_args def unpack_args
Homebrew::CLI::Parser.new do Homebrew::CLI::Parser.new do
usage_banner <<~EOS usage_banner <<~EOS
`unpack` [<options>] <formula> `unpack` [<options>] <formula> [<formula ...>]
Unpack the source files for <formula> into subdirectories of the current Unpack the source files for <formula> into subdirectories of the current
working directory. working directory.

View File

@ -13,7 +13,7 @@ module Homebrew
def update_python_resources_args def update_python_resources_args
Homebrew::CLI::Parser.new do Homebrew::CLI::Parser.new do
usage_banner <<~EOS usage_banner <<~EOS
`update-python-resources` [<options>] <formula> `update-python-resources` [<options>] <formula> [<formula> ...]
Update versions for PyPI resource blocks in <formula>. Update versions for PyPI resource blocks in <formula>.
EOS EOS
@ -34,7 +34,7 @@ module Homebrew
comma_array "--exclude-packages=", comma_array "--exclude-packages=",
description: "Exclude these packages when finding resources." description: "Exclude these packages when finding resources."
named_args :formula, number: 1 named_args :formula, min: 1
end end
end end