Merge pull request #5643 from GauthamGoli/upgrade-args

cmd/upgrade: Use CLI::Parser to parse args
This commit is contained in:
Mike McQuaid 2019-01-29 20:00:19 +00:00 committed by GitHub
commit 0f270d8115
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
18 changed files with 249 additions and 55 deletions

View File

@ -148,6 +148,21 @@ module Homebrew
.gsub(/\*(.*?)\*/m, "#{Tty.underline}\\1#{Tty.reset}")
end
def formula_options
ARGV.formulae.each do |f|
next if f.options.empty?
f.options.each do |o|
name = o.flag
description = "`#{f.name}`: #{o.description}"
if name.end_with? "="
flag name, description: description
else
switch name, description: description
end
end
end
end
private
def enable_switch(*names)

View File

@ -98,6 +98,7 @@ module Homebrew
"debugging the `--installed`/`--all` display mode."
switch :verbose
switch :debug
conflicts "--installed", "--all"
end
end

View File

@ -37,6 +37,7 @@ module Homebrew
description: "Search just the descriptions for provided <text>. If <text> is flanked by slashes, "\
"it is interpreted as a regular expression."
switch :verbose
conflicts "--search=", "--name=", "--description="
end
end

View File

@ -60,6 +60,8 @@ module Homebrew
"even if it would not be used during installation."
switch :verbose
switch :debug
conflicts "--devel", "--HEAD"
conflicts "--build-from-source", "--build-bottle", "--force-bottle"
end
end

View File

@ -79,6 +79,7 @@ module Homebrew
switch :verbose,
description: "See more verbose analytics data."
switch :debug
conflicts "--all", "--installed"
end
end

View File

@ -41,7 +41,7 @@
#: If `--devel` is passed, and <formula> defines it, install the development version.
#:
#: If `--HEAD` is passed, and <formula> defines it, install the HEAD version,
#: aka master, trunk, unstable.
#: aka. master, trunk, unstable.
#:
#: If `--keep-tmp` is passed, the temporary files created during installation
#: are not deleted.
@ -85,7 +85,7 @@ module Homebrew
def install_args
Homebrew::CLI::Parser.new do
usage_banner <<~EOS
`install` [<options>] formula
`install` [<options>] <formula>
Install <formula>.
@ -124,7 +124,7 @@ module Homebrew
switch "--devel",
description: "If <formula> defines it, install the development version."
switch "--HEAD",
description: "If <formula> defines it, install the HEAD version, aka master, trunk, unstable."
description: "If <formula> defines it, install the HEAD version, aka. master, trunk, unstable."
switch "--fetch-HEAD",
description: "Fetch the upstream repository to detect if the HEAD installation of the "\
"formula is outdated. Otherwise, the repository's HEAD will be checked for "\
@ -146,19 +146,10 @@ module Homebrew
"package into a Homebrew package."
switch "-g", "--git",
description: "Create a Git repository, useful for creating patches to the software."
ARGV.formulae.each do |f|
next if f.options.empty?
f.options.each do |o|
name = o.flag
description = "`#{f.name}`: #{o.description}"
if name.end_with? "="
flag name, description: description
else
switch name, description: description
end
end
end
conflicts "--ignore-dependencies", "--only-dependencies"
conflicts "--devel", "--HEAD"
conflicts "--build-from-source", "--build-bottle", "--force-bottle"
formula_options
end
end

View File

@ -29,6 +29,7 @@ module Homebrew
switch "--installed",
description: "Show options for all installed formulae."
switch :debug
conflicts "--all", "--installed"
end
end

View File

@ -46,6 +46,7 @@ module Homebrew
"formula is outdated. Otherwise, the repository's HEAD will be checked for "\
"updates when a new stable or devel version has been released."
switch :debug
conflicts "--quiet", "--verbose", "--json="
end
end

View File

@ -1,8 +1,30 @@
#: * `reinstall` [`--display-times`] <formula>:
#: Uninstall and then install <formula> (with existing install options).
#: * `reinstall` [`--debug`] [`--build-from-source`|`--force-bottle`] [`--keep-tmp`] [`--force`] [`--verbose`] [`--display-times`] <formula>:
#: Uninstall and then install <formula> (with existing and any appended install options).
#:
#: If `--debug` (or `-d`) is passed and brewing fails, open an interactive debugging
#: session with access to IRB or a shell inside the temporary build directory.
#:
#: If `--build-from-source` (or `-s`) is passed, compile the specified <formula> from
#: source even if a bottle is provided. Dependencies will still be installed
#: from bottles if they are available.
#:
#: If `--force-bottle` is passed, install from a bottle if it exists for the
#: current or newest version of macOS, even if it would not normally be used
#: for installation.
#:
#: If `--keep-tmp` is passed, the temporary files created during installation
#: are not deleted.
#:
#: If `--force` (or `-f`) is passed, install without checking for previously
#: installed keg-only or non-migrated versions
#:
#: If `--verbose` (or `-v`) is passed, print the verification and postinstall steps.
#:
#: If `--display-times` is passed, install times for each formula are printed
#: at the end of the run.
#:
#: Installation options specific to <formula> may be appended to the command,
#: and can be listed with `brew options` <formula>.
require "formula_installer"
require "development_tools"
@ -17,16 +39,29 @@ module Homebrew
def reinstall_args
Homebrew::CLI::Parser.new do
usage_banner <<~EOS
`reinstall` [<option(s)>] <formula>:
`reinstall` [<options>] <formula>
Uninstall and then install <formula> (with existing install options).
Uninstall and then install <formula> (with existing and any appended install options).
EOS
switch :debug,
description: "If brewing fails, open an interactive debugging session with access to IRB "\
"or a shell inside the temporary build directory"
switch "-s", "--build-from-source",
description: "Compile the formula> from source even if a bottle is available."
description: "Compile <formula> from source even if a bottle is available."
switch "--force-bottle",
description: "Install from a bottle if it exists for the current or newest version of "\
"macOS, even if it would not normally be used for installation."
switch "--keep-tmp",
description: "Dont delete the temporary files created during installation."
switch :force,
description: "Install without checking for previously installed keg-only or "\
"non-migrated versions."
switch :verbose,
description: "Print the verification and postinstall steps."
switch "--display-times",
description: "Print install times for each formula at the end of the run."
switch :verbose
switch :debug
conflicts "--build-from-source", "--force-bottle"
formula_options
end
end

View File

@ -34,6 +34,7 @@ module Homebrew
switch :force
switch :verbose
switch :debug
conflicts "--git", "--patch"
end
end

View File

@ -1,7 +1,19 @@
#: * `upgrade` [<install-options>] [`--fetch-HEAD`] [`--ignore-pinned`] [`--display-times`] [<formulae>]:
#: Upgrade outdated, unpinned brews (with existing install options).
#: * `upgrade` [`--debug`] [`--build-from-source`|`--force-bottle`] [`--fetch-HEAD`] [`--ignore-pinned`] [`--keep-tmp`] [`--force`] [`--verbose`] [`--display-times`] [<formula>] [<options> ...]:
#: Upgrade outdated, unpinned brews (with existing and any appended install options).
#:
#: Options for the `install` command are also valid here.
#: If <formula> are given, upgrade only the specified brews (unless they
#: are pinned; see `pin`, `unpin`).
#:
#: If `--debug` (or `-d`) is passed and brewing fails, open an interactive debugging
#: session with access to IRB or a shell inside the temporary build directory.
#:
#: If `--build-from-source` (or `-s`) is passed, compile the specified <formula> from
#: source even if a bottle is provided. Dependencies will still be installed
#: from bottles if they are available.
#:
#: If `--force-bottle` is passed, install from a bottle if it exists for the
#: current or newest version of macOS, even if it would not normally be used
#: for installation.
#:
#: If `--fetch-HEAD` is passed, fetch the upstream repository to detect if
#: the HEAD installation of the formula is outdated. Otherwise, the
@ -11,11 +23,19 @@
#: If `--ignore-pinned` is passed, set a 0 exit code even if pinned formulae
#: are not upgraded.
#:
#: If `--keep-tmp` is passed, the temporary files created during installation
#: are not deleted.
#:
#: If `--force` (or `-f`) is passed, install without checking for previously
#: installed keg-only or non-migrated versions
#:
#: If `--verbose` (or `-v`) is passed, print the verification and postinstall steps.
#:
#: If `--display-times` is passed, install times for each formula are printed
#: at the end of the run.
#:
#: If <formulae> are given, upgrade only the specified brews (unless they
#: are pinned; see `pin`, `unpin`).
#: Additional options specific to <formula> may be appended to the command,
#: and can be listed with `brew options` <formula>.
require "install"
require "reinstall"
@ -23,10 +43,49 @@ require "formula_installer"
require "development_tools"
require "messages"
require "cleanup"
require "cli_parser"
module Homebrew
module_function
def upgrade_args
Homebrew::CLI::Parser.new do
usage_banner <<~EOS
`upgrade` [<options>] <formula>
Upgrade outdated, unpinned brews (with existing and any appended install options).
If <formula> are given, upgrade only the specified brews (unless they
are pinned; see `pin`, `unpin`).
EOS
switch :debug,
description: "If brewing fails, open an interactive debugging session with access to IRB "\
"or a shell inside the temporary build directory"
switch "-s", "--build-from-source",
description: "Compile <formula> from source even if a bottle is available."
switch "--force-bottle",
description: "Install from a bottle if it exists for the current or newest version of "\
"macOS, even if it would not normally be used for installation."
switch "--fetch-HEAD",
description: "Fetch the upstream repository to detect if the HEAD installation of the "\
"formula is outdated. Otherwise, the repository's HEAD will be checked for "\
"updates when a new stable or devel version has been released."
switch "--ignore-pinned",
description: "Set a 0 exit code even if pinned formulae are not upgraded."
switch "--keep-tmp",
description: "Dont delete the temporary files created during installation."
switch :force,
description: "Install without checking for previously installed keg-only or "\
"non-migrated versions."
switch :verbose,
description: "Print the verification and postinstall steps."
switch "--display-times",
description: "Print install times for each formula at the end of the run."
conflicts "--build-from-source", "--force-bottle"
formula_options
end
end
def upgrade
if ARGV.include?("--cleanup")
odisabled("'brew upgrade --cleanup'")
@ -40,13 +99,13 @@ module Homebrew
if ARGV.named.empty?
outdated = Formula.installed.select do |f|
f.outdated?(fetch_head: ARGV.fetch_head?)
f.outdated?(fetch_head: args.fetch_HEAD?)
end
exit 0 if outdated.empty?
else
outdated = ARGV.resolved_formulae.select do |f|
f.outdated?(fetch_head: ARGV.fetch_head?)
f.outdated?(fetch_head: args.fetch_HEAD?)
end
(ARGV.resolved_formulae - outdated).each do |f|
@ -65,7 +124,7 @@ module Homebrew
outdated -= pinned
formulae_to_install = outdated.map(&:latest_formula)
if !pinned.empty? && !ARGV.include?("--ignore-pinned")
if !pinned.empty? && !args.ignore_pinned?
ofail "Not upgrading #{pinned.count} pinned #{"package".pluralize(pinned.count)}:"
puts pinned.map { |f| "#{f.full_specified_name} #{f.pkg_version}" } * ", "
end
@ -144,7 +203,7 @@ module Homebrew
fi = FormulaInstaller.new(f)
fi.options = options
fi.build_bottle = ARGV.build_bottle? || (!f.bottle_defined? && f.build.bottle?)
fi.build_bottle = args.build_bottle? || (!f.bottle_defined? && f.build.bottle?)
fi.installed_on_request = !ARGV.named.empty?
fi.link_keg ||= keg_was_linked if keg_had_linked_opt
if tab
@ -203,7 +262,7 @@ module Homebrew
next if formulae_to_upgrade.include?(f)
next if formulae_pinned.include?(f)
if f.outdated?(fetch_head: ARGV.fetch_head?)
if f.outdated?(fetch_head: args.fetch_HEAD?)
if f.pinned?
formulae_pinned << f
else
@ -247,7 +306,7 @@ module Homebrew
checker = LinkageChecker.new(keg, cache_db: db)
if checker.broken_library_linkage?
if f.outdated?(fetch_head: ARGV.fetch_head?)
if f.outdated?(fetch_head: args.fetch_HEAD?)
# Outdated formulae = pinned formulae (see function above)
formulae_pinned_and_outdated << f
else
@ -295,7 +354,7 @@ module Homebrew
return if kegs.empty?
oh1 "Checking dependents for outdated formulae" if ARGV.verbose?
oh1 "Checking dependents for outdated formulae" if args.verbose?
upgradable, pinned = upgradable_dependents(kegs, formulae).map(&:to_a)
upgradable.sort! { |a, b| depends_on(a, b) }
@ -310,7 +369,7 @@ module Homebrew
# Print the upgradable dependents.
if upgradable.empty?
ohai "No dependents to upgrade" if ARGV.verbose?
ohai "No dependents to upgrade" if args.verbose?
else
ohai "Upgrading #{upgradable.count} #{"dependent".pluralize(upgradable.count)}:"
formulae_upgrades = upgradable.map do |f|
@ -328,7 +387,7 @@ module Homebrew
# Assess the dependents tree again.
kegs = formulae_with_runtime_dependencies
oh1 "Checking dependents for broken library links" if ARGV.verbose?
oh1 "Checking dependents for broken library links" if args.verbose?
reinstallable, pinned = broken_dependents(kegs, formulae).map(&:to_a)
reinstallable.sort! { |a, b| depends_on(a, b) }
@ -343,7 +402,7 @@ module Homebrew
# Print the broken dependents.
if reinstallable.empty?
ohai "No broken dependents to reinstall" if ARGV.verbose?
ohai "No broken dependents to reinstall" if args.verbose?
else
ohai "Reinstalling #{reinstallable.count} broken #{"dependent".pluralize(reinstallable.count)} from source:"
puts reinstallable.map(&:full_specified_name).join(", ")

View File

@ -59,6 +59,7 @@ module Homebrew
switch "--HEAD",
description: "Show usage of <formulae> by HEAD build."
switch :debug
conflicts "--devel", "--HEAD"
end
end

View File

@ -104,6 +104,7 @@ module Homebrew
switch :quiet
switch :verbose
switch :debug
conflicts "--no-audit", "--strict"
conflicts "--url", "--tag"
end
end

View File

@ -59,6 +59,7 @@ module Homebrew
switch :force
switch :verbose
switch :debug
conflicts "--autotools", "--cmake", "--meson"
end
end

View File

@ -41,6 +41,7 @@ module Homebrew
description: "Keep the temporary files created for the test."
switch :verbose
switch :debug
conflicts "--devel", "--HEAD"
end
end

View File

@ -21,8 +21,9 @@ describe "brew reinstall", :integration_test do
end
it "reinstalls a Formula even when one of the options is invalid" do
expect { brew "reinstall", "testball", "--with-fo" }
.to output(/Error: invalid option: --with-fo/).to_stderr
expect { brew "reinstall", "testball", "--invalid" }
.to output(/Error: invalid option: --invalid/).to_stderr
.and not_to_output.to_stdout
.and be_a_failure
end

View File

@ -279,7 +279,7 @@ these flags should only appear after a command.
If `--devel` is passed, and *`formula`* defines it, install the development version.
If `--HEAD` is passed, and *`formula`* defines it, install the HEAD version,
aka master, trunk, unstable.
aka. master, trunk, unstable.
If `--keep-tmp` is passed, the temporary files created during installation
are not deleted.
@ -414,12 +414,34 @@ these flags should only appear after a command.
If `--syntax` is passed, also syntax-check all of Homebrew's Ruby files.
* `reinstall` [`--display-times`] *`formula`*:
Uninstall and then install *`formula`* (with existing install options).
* `reinstall` [`--debug`] [`--build-from-source`|`--force-bottle`] [`--keep-tmp`] [`--force`] [`--verbose`] [`--display-times`] *`formula`*:
Uninstall and then install *`formula`* (with existing and any appended install options).
If `--debug` (or `-d`) is passed and brewing fails, open an interactive debugging
session with access to IRB or a shell inside the temporary build directory.
If `--build-from-source` (or `-s`) is passed, compile the specified *`formula`* from
source even if a bottle is provided. Dependencies will still be installed
from bottles if they are available.
If `--force-bottle` is passed, install from a bottle if it exists for the
current or newest version of macOS, even if it would not normally be used
for installation.
If `--keep-tmp` is passed, the temporary files created during installation
are not deleted.
If `--force` (or `-f`) is passed, install without checking for previously
installed keg-only or non-migrated versions
If `--verbose` (or `-v`) is passed, print the verification and postinstall steps.
If `--display-times` is passed, install times for each formula are printed
at the end of the run.
Installation options specific to *`formula`* may be appended to the command,
and can be listed with `brew options` *`formula`*.
* `search`, `-S`:
Display all locally available formulae (including tapped ones).
No online search is performed.
@ -588,10 +610,22 @@ these flags should only appear after a command.
`repositories`) using `git`(1) to their latest `origin/master`. Note this
will destroy all your uncommitted or committed changes.
* `upgrade` [*`install-options`*] [`--fetch-HEAD`] [`--ignore-pinned`] [`--display-times`] [*`formulae`*]:
Upgrade outdated, unpinned brews (with existing install options).
* `upgrade` [`--debug`] [`--build-from-source`|`--force-bottle`] [`--fetch-HEAD`] [`--ignore-pinned`] [`--keep-tmp`] [`--force`] [`--verbose`] [`--display-times`] [*`formula`*] [*`options`* ...]:
Upgrade outdated, unpinned brews (with existing and any appended install options).
Options for the `install` command are also valid here.
If *`formula`* are given, upgrade only the specified brews (unless they
are pinned; see `pin`, `unpin`).
If `--debug` (or `-d`) is passed and brewing fails, open an interactive debugging
session with access to IRB or a shell inside the temporary build directory.
If `--build-from-source` (or `-s`) is passed, compile the specified *`formula`* from
source even if a bottle is provided. Dependencies will still be installed
from bottles if they are available.
If `--force-bottle` is passed, install from a bottle if it exists for the
current or newest version of macOS, even if it would not normally be used
for installation.
If `--fetch-HEAD` is passed, fetch the upstream repository to detect if
the HEAD installation of the formula is outdated. Otherwise, the
@ -601,11 +635,19 @@ these flags should only appear after a command.
If `--ignore-pinned` is passed, set a 0 exit code even if pinned formulae
are not upgraded.
If `--keep-tmp` is passed, the temporary files created during installation
are not deleted.
If `--force` (or `-f`) is passed, install without checking for previously
installed keg-only or non-migrated versions
If `--verbose` (or `-v`) is passed, print the verification and postinstall steps.
If `--display-times` is passed, install times for each formula are printed
at the end of the run.
If *`formulae`* are given, upgrade only the specified brews (unless they
are pinned; see `pin`, `unpin`).
Additional options specific to *`formula`* may be appended to the command,
and can be listed with `brew options` *`formula`*.
* `uses` [`--installed`] [`--recursive`] [`--include-build`] [`--include-test`] [`--include-optional`] [`--skip-recommended`] [`--devel`|`--HEAD`] *`formulae`*:
Show the formulae that specify *`formulae`* as a dependency. When given

View File

@ -285,7 +285,7 @@ If \fB\-\-include\-test\fR is passed, install testing dependencies\. These are o
If \fB\-\-devel\fR is passed, and \fIformula\fR defines it, install the development version\.
.
.IP
If \fB\-\-HEAD\fR is passed, and \fIformula\fR defines it, install the HEAD version, aka master, trunk, unstable\.
If \fB\-\-HEAD\fR is passed, and \fIformula\fR defines it, install the HEAD version, aka\. master, trunk, unstable\.
.
.IP
If \fB\-\-keep\-tmp\fR is passed, the temporary files created during installation are not deleted\.
@ -426,12 +426,33 @@ If \fB\-\-aliases\fR is passed, also verify any alias symlinks in each tap\.
If \fB\-\-syntax\fR is passed, also syntax\-check all of Homebrew\'s Ruby files\.
.
.TP
\fBreinstall\fR [\fB\-\-display\-times\fR] \fIformula\fR
Uninstall and then install \fIformula\fR (with existing install options)\.
\fBreinstall\fR [\fB\-\-debug\fR] [\fB\-\-build\-from\-source\fR|\fB\-\-force\-bottle\fR] [\fB\-\-keep\-tmp\fR] [\fB\-\-force\fR] [\fB\-\-verbose\fR] [\fB\-\-display\-times\fR] \fIformula\fR
Uninstall and then install \fIformula\fR (with existing and any appended install options)\.
.
.IP
If \fB\-\-debug\fR (or \fB\-d\fR) is passed and brewing fails, open an interactive debugging session with access to IRB or a shell inside the temporary build directory\.
.
.IP
If \fB\-\-build\-from\-source\fR (or \fB\-s\fR) is passed, compile the specified \fIformula\fR from source even if a bottle is provided\. Dependencies will still be installed from bottles if they are available\.
.
.IP
If \fB\-\-force\-bottle\fR is passed, install from a bottle if it exists for the current or newest version of macOS, even if it would not normally be used for installation\.
.
.IP
If \fB\-\-keep\-tmp\fR is passed, the temporary files created during installation are not deleted\.
.
.IP
If \fB\-\-force\fR (or \fB\-f\fR) is passed, install without checking for previously installed keg\-only or non\-migrated versions
.
.IP
If \fB\-\-verbose\fR (or \fB\-v\fR) is passed, print the verification and postinstall steps\.
.
.IP
If \fB\-\-display\-times\fR is passed, install times for each formula are printed at the end of the run\.
.
.IP
Installation options specific to \fIformula\fR may be appended to the command, and can be listed with \fBbrew options\fR \fIformula\fR\.
.
.TP
\fBsearch\fR, \fB\-S\fR
Display all locally available formulae (including tapped ones)\. No online search is performed\.
@ -601,11 +622,20 @@ If \fB\-\-force\fR (or \fB\-f\fR) is specified then always do a slower, full upd
Fetches and resets Homebrew and all tap repositories (or the specified \fBrepositories\fR) using \fBgit\fR(1) to their latest \fBorigin/master\fR\. Note this will destroy all your uncommitted or committed changes\.
.
.TP
\fBupgrade\fR [\fIinstall\-options\fR] [\fB\-\-fetch\-HEAD\fR] [\fB\-\-ignore\-pinned\fR] [\fB\-\-display\-times\fR] [\fIformulae\fR]
Upgrade outdated, unpinned brews (with existing install options)\.
\fBupgrade\fR [\fB\-\-debug\fR] [\fB\-\-build\-from\-source\fR|\fB\-\-force\-bottle\fR] [\fB\-\-fetch\-HEAD\fR] [\fB\-\-ignore\-pinned\fR] [\fB\-\-keep\-tmp\fR] [\fB\-\-force\fR] [\fB\-\-verbose\fR] [\fB\-\-display\-times\fR] [\fIformula\fR] [\fIoptions\fR \.\.\.]
Upgrade outdated, unpinned brews (with existing and any appended install options)\.
.
.IP
Options for the \fBinstall\fR command are also valid here\.
If \fIformula\fR are given, upgrade only the specified brews (unless they are pinned; see \fBpin\fR, \fBunpin\fR)\.
.
.IP
If \fB\-\-debug\fR (or \fB\-d\fR) is passed and brewing fails, open an interactive debugging session with access to IRB or a shell inside the temporary build directory\.
.
.IP
If \fB\-\-build\-from\-source\fR (or \fB\-s\fR) is passed, compile the specified \fIformula\fR from source even if a bottle is provided\. Dependencies will still be installed from bottles if they are available\.
.
.IP
If \fB\-\-force\-bottle\fR is passed, install from a bottle if it exists for the current or newest version of macOS, even if it would not normally be used for installation\.
.
.IP
If \fB\-\-fetch\-HEAD\fR is passed, fetch the upstream repository to detect if the HEAD installation of the formula is outdated\. Otherwise, the repository\'s HEAD will be checked for updates when a new stable or devel version has been released\.
@ -614,10 +644,19 @@ If \fB\-\-fetch\-HEAD\fR is passed, fetch the upstream repository to detect if t
If \fB\-\-ignore\-pinned\fR is passed, set a 0 exit code even if pinned formulae are not upgraded\.
.
.IP
If \fB\-\-keep\-tmp\fR is passed, the temporary files created during installation are not deleted\.
.
.IP
If \fB\-\-force\fR (or \fB\-f\fR) is passed, install without checking for previously installed keg\-only or non\-migrated versions
.
.IP
If \fB\-\-verbose\fR (or \fB\-v\fR) is passed, print the verification and postinstall steps\.
.
.IP
If \fB\-\-display\-times\fR is passed, install times for each formula are printed at the end of the run\.
.
.IP
If \fIformulae\fR are given, upgrade only the specified brews (unless they are pinned; see \fBpin\fR, \fBunpin\fR)\.
Additional options specific to \fIformula\fR may be appended to the command, and can be listed with \fBbrew options\fR \fIformula\fR\.
.
.TP
\fBuses\fR [\fB\-\-installed\fR] [\fB\-\-recursive\fR] [\fB\-\-include\-build\fR] [\fB\-\-include\-test\fR] [\fB\-\-include\-optional\fR] [\fB\-\-skip\-recommended\fR] [\fB\-\-devel\fR|\fB\-\-HEAD\fR] \fIformulae\fR