From 7743fed77bb4cee2100ff78c82d238992cedfb72 Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Sat, 3 Oct 2020 02:45:32 +0200 Subject: [PATCH] =?UTF-8?q?Add=20=E2=80=9CGLOBAL=20CASK=20OPTIONS=E2=80=9D?= =?UTF-8?q?=20section=20to=20man=20page.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Library/Homebrew/cask/cmd.rb | 68 +---- Library/Homebrew/cli/parser.rb | 82 +++++- Library/Homebrew/cmd/install.rb | 20 +- Library/Homebrew/cmd/reinstall.rb | 4 +- Library/Homebrew/cmd/upgrade.rb | 5 +- Library/Homebrew/dev-cmd/man.rb | 16 +- Library/Homebrew/manpages/brew-cask.1.md | 1 - Library/Homebrew/manpages/brew.1.md.erb | 4 + docs/Manpage.md | 171 ++++--------- manpages/brew.1 | 303 +++++------------------ 10 files changed, 226 insertions(+), 448 deletions(-) delete mode 100644 Library/Homebrew/manpages/brew-cask.1.md diff --git a/Library/Homebrew/cask/cmd.rb b/Library/Homebrew/cask/cmd.rb index 644737c24b..38795bffe3 100644 --- a/Library/Homebrew/cask/cmd.rb +++ b/Library/Homebrew/cask/cmd.rb @@ -79,70 +79,6 @@ module Cask EOS end - OPTIONS = [ - [:flag, "--appdir=", { - description: "Target location for Applications. " \ - "Default: `#{Config::DEFAULT_DIRS[:appdir]}`", - }], - [:flag, "--colorpickerdir=", { - description: "Target location for Color Pickers. " \ - "Default: `#{Config::DEFAULT_DIRS[:colorpickerdir]}`", - }], - [:flag, "--prefpanedir=", { - description: "Target location for Preference Panes. " \ - "Default: `#{Config::DEFAULT_DIRS[:prefpanedir]}`", - }], - [:flag, "--qlplugindir=", { - description: "Target location for QuickLook Plugins. " \ - "Default: `#{Config::DEFAULT_DIRS[:qlplugindir]}`", - }], - [:flag, "--mdimporterdir=", { - description: "Target location for Spotlight Plugins. " \ - "Default: `#{Config::DEFAULT_DIRS[:mdimporterdir]}`", - }], - [:flag, "--dictionarydir=", { - description: "Target location for Dictionaries. " \ - "Default: `#{Config::DEFAULT_DIRS[:dictionarydir]}`", - }], - [:flag, "--fontdir=", { - description: "Target location for Fonts. " \ - "Default: `#{Config::DEFAULT_DIRS[:fontdir]}`", - }], - [:flag, "--servicedir=", { - description: "Target location for Services. " \ - "Default: `#{Config::DEFAULT_DIRS[:servicedir]}`", - }], - [:flag, "--input_methoddir=", { - description: "Target location for Input Methods. " \ - "Default: `#{Config::DEFAULT_DIRS[:input_methoddir]}`", - }], - [:flag, "--internet_plugindir=", { - description: "Target location for Internet Plugins. " \ - "Default: `#{Config::DEFAULT_DIRS[:internet_plugindir]}`", - }], - [:flag, "--audio_unit_plugindir=", { - description: "Target location for Audio Unit Plugins. " \ - "Default: `#{Config::DEFAULT_DIRS[:audio_unit_plugindir]}`", - }], - [:flag, "--vst_plugindir=", { - description: "Target location for VST Plugins. " \ - "Default: `#{Config::DEFAULT_DIRS[:vst_plugindir]}`", - }], - [:flag, "--vst3_plugindir=", { - description: "Target location for VST3 Plugins. " \ - "Default: `#{Config::DEFAULT_DIRS[:vst3_plugindir]}`", - }], - [:flag, "--screen_saverdir=", { - description: "Target location for Screen Savers. " \ - "Default: `#{Config::DEFAULT_DIRS[:screen_saverdir]}`", - }], - [:comma_array, "--language", { - description: "Set language of the Cask to install. The first matching " \ - "language is used, otherwise the default language on the Cask. " \ - "The default value is the `language of your system`", - }], - ].freeze - def self.parser(&block) Homebrew::CLI::Parser.new do if block_given? @@ -155,9 +91,7 @@ module Cask EOS end - OPTIONS.each do |option| - send(*option) - end + cask_options end end diff --git a/Library/Homebrew/cli/parser.rb b/Library/Homebrew/cli/parser.rb index d1ee78f854..2bc86bc4e0 100644 --- a/Library/Homebrew/cli/parser.rb +++ b/Library/Homebrew/cli/parser.rb @@ -1,6 +1,7 @@ # frozen_string_literal: true require "env_config" +require "cask/config" require "cli/args" require "optparse" require "set" @@ -26,12 +27,78 @@ module Homebrew end end + def self.global_cask_options + [ + [:flag, "--appdir=", { + description: "Target location for Applications. " \ + "Default: `#{Cask::Config::DEFAULT_DIRS[:appdir]}`", + }], + [:flag, "--colorpickerdir=", { + description: "Target location for Color Pickers. " \ + "Default: `#{Cask::Config::DEFAULT_DIRS[:colorpickerdir]}`", + }], + [:flag, "--prefpanedir=", { + description: "Target location for Preference Panes. " \ + "Default: `#{Cask::Config::DEFAULT_DIRS[:prefpanedir]}`", + }], + [:flag, "--qlplugindir=", { + description: "Target location for QuickLook Plugins. " \ + "Default: `#{Cask::Config::DEFAULT_DIRS[:qlplugindir]}`", + }], + [:flag, "--mdimporterdir=", { + description: "Target location for Spotlight Plugins. " \ + "Default: `#{Cask::Config::DEFAULT_DIRS[:mdimporterdir]}`", + }], + [:flag, "--dictionarydir=", { + description: "Target location for Dictionaries. " \ + "Default: `#{Cask::Config::DEFAULT_DIRS[:dictionarydir]}`", + }], + [:flag, "--fontdir=", { + description: "Target location for Fonts. " \ + "Default: `#{Cask::Config::DEFAULT_DIRS[:fontdir]}`", + }], + [:flag, "--servicedir=", { + description: "Target location for Services. " \ + "Default: `#{Cask::Config::DEFAULT_DIRS[:servicedir]}`", + }], + [:flag, "--input_methoddir=", { + description: "Target location for Input Methods. " \ + "Default: `#{Cask::Config::DEFAULT_DIRS[:input_methoddir]}`", + }], + [:flag, "--internet_plugindir=", { + description: "Target location for Internet Plugins. " \ + "Default: `#{Cask::Config::DEFAULT_DIRS[:internet_plugindir]}`", + }], + [:flag, "--audio_unit_plugindir=", { + description: "Target location for Audio Unit Plugins. " \ + "Default: `#{Cask::Config::DEFAULT_DIRS[:audio_unit_plugindir]}`", + }], + [:flag, "--vst_plugindir=", { + description: "Target location for VST Plugins. " \ + "Default: `#{Cask::Config::DEFAULT_DIRS[:vst_plugindir]}`", + }], + [:flag, "--vst3_plugindir=", { + description: "Target location for VST3 Plugins. " \ + "Default: `#{Cask::Config::DEFAULT_DIRS[:vst3_plugindir]}`", + }], + [:flag, "--screen_saverdir=", { + description: "Target location for Screen Savers. " \ + "Default: `#{Cask::Config::DEFAULT_DIRS[:screen_saverdir]}`", + }], + [:comma_array, "--language", { + description: "Set language of the Cask to install. The first matching " \ + "language is used, otherwise the default language on the Cask. " \ + "The default value is the `language of your system`", + }], + ] + end + def self.global_options [ - ["-d", "--debug", "Display any debugging information."], - ["-q", "--quiet", "Suppress any warnings."], + ["-d", "--debug", "Display any debugging information."], + ["-q", "--quiet", "Suppress any warnings."], ["-v", "--verbose", "Make some output more verbose."], - ["-h", "--help", "Show this message."], + ["-h", "--help", "Show this message."], ] end @@ -211,6 +278,8 @@ module Homebrew else switch name, description: description end + + conflicts "--cask", name end end end @@ -254,6 +323,13 @@ module Homebrew .gsub(/\*(.*?)\*/m, "#{Tty.underline}\\1#{Tty.reset}") end + def cask_options + self.class.global_cask_options.each do |method, *args, **options| + send(method, *args, **options) + conflicts "--formula", args.last + end + end + def formula_options @formula_options = true end diff --git a/Library/Homebrew/cmd/install.rb b/Library/Homebrew/cmd/install.rb index e4bd2a31ab..824e4af6f2 100644 --- a/Library/Homebrew/cmd/install.rb +++ b/Library/Homebrew/cmd/install.rb @@ -22,7 +22,6 @@ module Homebrew [:switch, "--cask", "--casks", { description: "Treat all named arguments as casks.", }], - *Cask::Cmd::OPTIONS, *Cask::Cmd::AbstractCommand::OPTIONS, *Cask::Cmd::Install::OPTIONS, ] @@ -132,17 +131,18 @@ module Homebrew conflicts "--ignore-dependencies", "--only-dependencies" conflicts "--build-from-source", "--build-bottle", "--force-bottle" - formula_only_options.each do |options| - send(*options) - conflicts "--cask", options[-2] + formula_only_options.each do |*args, **options| + send(*args, **options) + conflicts "--cask", args.last end - - cask_only_options.each do |options| - send(*options) - conflicts "--formula", options[-2] - end - formula_options + + cask_only_options.each do |*args, **options| + send(*args, **options) + conflicts "--formula", args.last + end + cask_options + min_named 1 end end diff --git a/Library/Homebrew/cmd/reinstall.rb b/Library/Homebrew/cmd/reinstall.rb index 4aa8b0be3f..c760cfa578 100644 --- a/Library/Homebrew/cmd/reinstall.rb +++ b/Library/Homebrew/cmd/reinstall.rb @@ -20,7 +20,6 @@ module Homebrew [:switch, "--cask", "--casks", { description: "Treat all named arguments as casks.", }], - *Cask::Cmd::OPTIONS, *Cask::Cmd::AbstractCommand::OPTIONS, ] @@ -73,13 +72,14 @@ module Homebrew send(*options) conflicts "--cask", options[-2] end + formula_options cask_only_options.each do |options| send(*options) conflicts "--formula", options[-2] end + cask_options - formula_options min_named 1 end end diff --git a/Library/Homebrew/cmd/upgrade.rb b/Library/Homebrew/cmd/upgrade.rb index fe7b6fc2bb..2af6ee603c 100644 --- a/Library/Homebrew/cmd/upgrade.rb +++ b/Library/Homebrew/cmd/upgrade.rb @@ -17,7 +17,6 @@ module Homebrew description: "Treat all named arguments as casks. If no named arguments " \ "are specified, upgrade only outdated casks.", }], - *Cask::Cmd::OPTIONS, *Cask::Cmd::AbstractCommand::OPTIONS, *Cask::Cmd::Upgrade::OPTIONS, ] @@ -85,13 +84,13 @@ module Homebrew send(*options) conflicts "--cask", options[-2] end + formula_options cask_only_options.each do |options| send(*options) conflicts "--formula", options[-2] end - - formula_options + cask_options end end diff --git a/Library/Homebrew/dev-cmd/man.rb b/Library/Homebrew/dev-cmd/man.rb index e34fe3cfcb..cea445b3d7 100644 --- a/Library/Homebrew/dev-cmd/man.rb +++ b/Library/Homebrew/dev-cmd/man.rb @@ -66,6 +66,7 @@ module Homebrew variables[:developer_commands] = generate_cmd_manpages(Commands.internal_developer_commands_paths) variables[:official_external_commands] = generate_cmd_manpages(Commands.official_external_commands_paths(quiet: quiet)) + variables[:global_cask_options] = global_cask_options_manpage variables[:global_options] = global_options_manpage variables[:environment_variables] = env_vars_manpage @@ -171,7 +172,12 @@ module Homebrew def cmd_parser_manpage_lines(cmd_parser) lines = [format_usage_banner(cmd_parser.usage_banner_text)] lines += cmd_parser.processed_options.map do |short, long, _, desc| - next if !long.nil? && Homebrew::CLI::Parser.global_options.include?([short, long, desc]) + if long.present? + next if Homebrew::CLI::Parser.global_options.include?([short, long, desc]) + next if Homebrew::CLI::Parser.global_cask_options.any? do |_, option, description:, **| + [long, "#{long}="].include?(option) && description == desc + end + end generate_option_doc(short, long, desc) end.reject(&:blank?) @@ -203,6 +209,14 @@ module Homebrew lines end + def global_cask_options_manpage + lines = ["These options are applicable to subcommands accepting a `--cask` flag and all `cask` commands.\n"] + lines += Homebrew::CLI::Parser.global_cask_options.map do |_, long, description:, **| + generate_option_doc(nil, long, description) + end + lines.join("\n") + end + def global_options_manpage lines = ["These options are applicable across multiple subcommands.\n"] lines += Homebrew::CLI::Parser.global_options.map do |short, long, desc| diff --git a/Library/Homebrew/manpages/brew-cask.1.md b/Library/Homebrew/manpages/brew-cask.1.md deleted file mode 100644 index 8b13789179..0000000000 --- a/Library/Homebrew/manpages/brew-cask.1.md +++ /dev/null @@ -1 +0,0 @@ - diff --git a/Library/Homebrew/manpages/brew.1.md.erb b/Library/Homebrew/manpages/brew.1.md.erb index 593037011f..6d4773cd77 100644 --- a/Library/Homebrew/manpages/brew.1.md.erb +++ b/Library/Homebrew/manpages/brew.1.md.erb @@ -59,6 +59,10 @@ If no search term is provided, all locally available formulae are listed. <%= developer_commands %> +## GLOBAL CASK OPTIONS + +<%= global_cask_options %> + ## GLOBAL OPTIONS <%= global_options %> diff --git a/docs/Manpage.md b/docs/Manpage.md index 3298d50e85..2e5267b34c 100644 --- a/docs/Manpage.md +++ b/docs/Manpage.md @@ -118,37 +118,6 @@ Commands: See also: `man brew` -* `--appdir`: - Target location for Applications. Default: `/Applications` -* `--colorpickerdir`: - Target location for Color Pickers. Default: `~/Library/ColorPickers` -* `--prefpanedir`: - Target location for Preference Panes. Default: `~/Library/PreferencePanes` -* `--qlplugindir`: - Target location for QuickLook Plugins. Default: `~/Library/QuickLook` -* `--mdimporterdir`: - Target location for Spotlight Plugins. Default: `~/Library/Spotlight` -* `--dictionarydir`: - Target location for Dictionaries. Default: `~/Library/Dictionaries` -* `--fontdir`: - Target location for Fonts. Default: `~/Library/Fonts` -* `--servicedir`: - Target location for Services. Default: `~/Library/Services` -* `--input_methoddir`: - Target location for Input Methods. Default: `~/Library/Input Methods` -* `--internet_plugindir`: - Target location for Internet Plugins. Default: `~/Library/Internet Plug-Ins` -* `--audio_unit_plugindir`: - Target location for Audio Unit Plugins. Default: `~/Library/Audio/Plug-Ins/Components` -* `--vst_plugindir`: - Target location for VST Plugins. Default: `~/Library/Audio/Plug-Ins/VST` -* `--vst3_plugindir`: - Target location for VST3 Plugins. Default: `~/Library/Audio/Plug-Ins/VST3` -* `--screen_saverdir`: - Target location for Screen Savers. Default: `~/Library/Screen Savers` -* `--language`: - Set language of the Cask to install. The first matching language is used, otherwise the default language on the Cask. The default value is the `language of your system` - ### `cleanup` [*`options`*] [*`formula`*|*`cask`*] Remove stale lock files and outdated downloads for all formulae and casks, @@ -352,36 +321,6 @@ the installed formulae or, every 30 days, for all formulae. Create a Git repository, useful for creating patches to the software. * `--cask`: Treat all named arguments as casks. -* `--appdir`: - Target location for Applications. Default: `/Applications` -* `--colorpickerdir`: - Target location for Color Pickers. Default: `~/Library/ColorPickers` -* `--prefpanedir`: - Target location for Preference Panes. Default: `~/Library/PreferencePanes` -* `--qlplugindir`: - Target location for QuickLook Plugins. Default: `~/Library/QuickLook` -* `--mdimporterdir`: - Target location for Spotlight Plugins. Default: `~/Library/Spotlight` -* `--dictionarydir`: - Target location for Dictionaries. Default: `~/Library/Dictionaries` -* `--fontdir`: - Target location for Fonts. Default: `~/Library/Fonts` -* `--servicedir`: - Target location for Services. Default: `~/Library/Services` -* `--input_methoddir`: - Target location for Input Methods. Default: `~/Library/Input Methods` -* `--internet_plugindir`: - Target location for Internet Plugins. Default: `~/Library/Internet Plug-Ins` -* `--audio_unit_plugindir`: - Target location for Audio Unit Plugins. Default: `~/Library/Audio/Plug-Ins/Components` -* `--vst_plugindir`: - Target location for VST Plugins. Default: `~/Library/Audio/Plug-Ins/VST` -* `--vst3_plugindir`: - Target location for VST3 Plugins. Default: `~/Library/Audio/Plug-Ins/VST3` -* `--screen_saverdir`: - Target location for Screen Savers. Default: `~/Library/Screen Savers` -* `--language`: - Set language of the Cask to install. The first matching language is used, otherwise the default language on the Cask. The default value is the `language of your system` * `--[no-]binaries`: Disable/enable linking of helper executables. Default: enabled * `--require-sha`: @@ -552,36 +491,6 @@ reinstalled formulae or, every 30 days, for all formulae. Print install times for each formula at the end of the run. * `--cask`: Treat all named arguments as casks. -* `--appdir`: - Target location for Applications. Default: `/Applications` -* `--colorpickerdir`: - Target location for Color Pickers. Default: `~/Library/ColorPickers` -* `--prefpanedir`: - Target location for Preference Panes. Default: `~/Library/PreferencePanes` -* `--qlplugindir`: - Target location for QuickLook Plugins. Default: `~/Library/QuickLook` -* `--mdimporterdir`: - Target location for Spotlight Plugins. Default: `~/Library/Spotlight` -* `--dictionarydir`: - Target location for Dictionaries. Default: `~/Library/Dictionaries` -* `--fontdir`: - Target location for Fonts. Default: `~/Library/Fonts` -* `--servicedir`: - Target location for Services. Default: `~/Library/Services` -* `--input_methoddir`: - Target location for Input Methods. Default: `~/Library/Input Methods` -* `--internet_plugindir`: - Target location for Internet Plugins. Default: `~/Library/Internet Plug-Ins` -* `--audio_unit_plugindir`: - Target location for Audio Unit Plugins. Default: `~/Library/Audio/Plug-Ins/Components` -* `--vst_plugindir`: - Target location for VST Plugins. Default: `~/Library/Audio/Plug-Ins/VST` -* `--vst3_plugindir`: - Target location for VST3 Plugins. Default: `~/Library/Audio/Plug-Ins/VST3` -* `--screen_saverdir`: - Target location for Screen Savers. Default: `~/Library/Screen Savers` -* `--language`: - Set language of the Cask to install. The first matching language is used, otherwise the default language on the Cask. The default value is the `language of your system` * `--[no-]binaries`: Disable/enable linking of helper executables. Default: enabled * `--require-sha`: @@ -745,36 +654,6 @@ upgraded formulae or, every 30 days, for all formulae. Print install times for each formula at the end of the run. * `--cask`: Treat all named arguments as casks. If no named arguments are specified, upgrade only outdated casks. -* `--appdir`: - Target location for Applications. Default: `/Applications` -* `--colorpickerdir`: - Target location for Color Pickers. Default: `~/Library/ColorPickers` -* `--prefpanedir`: - Target location for Preference Panes. Default: `~/Library/PreferencePanes` -* `--qlplugindir`: - Target location for QuickLook Plugins. Default: `~/Library/QuickLook` -* `--mdimporterdir`: - Target location for Spotlight Plugins. Default: `~/Library/Spotlight` -* `--dictionarydir`: - Target location for Dictionaries. Default: `~/Library/Dictionaries` -* `--fontdir`: - Target location for Fonts. Default: `~/Library/Fonts` -* `--servicedir`: - Target location for Services. Default: `~/Library/Services` -* `--input_methoddir`: - Target location for Input Methods. Default: `~/Library/Input Methods` -* `--internet_plugindir`: - Target location for Internet Plugins. Default: `~/Library/Internet Plug-Ins` -* `--audio_unit_plugindir`: - Target location for Audio Unit Plugins. Default: `~/Library/Audio/Plug-Ins/Components` -* `--vst_plugindir`: - Target location for VST Plugins. Default: `~/Library/Audio/Plug-Ins/VST` -* `--vst3_plugindir`: - Target location for VST3 Plugins. Default: `~/Library/Audio/Plug-Ins/VST3` -* `--screen_saverdir`: - Target location for Screen Savers. Default: `~/Library/Screen Savers` -* `--language`: - Set language of the Cask to install. The first matching language is used, otherwise the default language on the Cask. The default value is the `language of your system` * `--[no-]binaries`: Disable/enable linking of helper executables. Default: enabled * `--require-sha`: @@ -1439,6 +1318,55 @@ If no options are passed, use `origin/master` as the start commit. Install and commit Homebrew's vendored gems. +## GLOBAL CASK OPTIONS + +These options are applicable to subcommands accepting a `--cask` flag and all `cask` commands. + +* `--appdir=`: + Target location for Applications. Default: `/Applications` + +* `--colorpickerdir=`: + Target location for Color Pickers. Default: `~/Library/ColorPickers` + +* `--prefpanedir=`: + Target location for Preference Panes. Default: `~/Library/PreferencePanes` + +* `--qlplugindir=`: + Target location for QuickLook Plugins. Default: `~/Library/QuickLook` + +* `--mdimporterdir=`: + Target location for Spotlight Plugins. Default: `~/Library/Spotlight` + +* `--dictionarydir=`: + Target location for Dictionaries. Default: `~/Library/Dictionaries` + +* `--fontdir=`: + Target location for Fonts. Default: `~/Library/Fonts` + +* `--servicedir=`: + Target location for Services. Default: `~/Library/Services` + +* `--input_methoddir=`: + Target location for Input Methods. Default: `~/Library/Input Methods` + +* `--internet_plugindir=`: + Target location for Internet Plugins. Default: `~/Library/Internet Plug-Ins` + +* `--audio_unit_plugindir=`: + Target location for Audio Unit Plugins. Default: `~/Library/Audio/Plug-Ins/Components` + +* `--vst_plugindir=`: + Target location for VST Plugins. Default: `~/Library/Audio/Plug-Ins/VST` + +* `--vst3_plugindir=`: + Target location for VST3 Plugins. Default: `~/Library/Audio/Plug-Ins/VST3` + +* `--screen_saverdir=`: + Target location for Screen Savers. Default: `~/Library/Screen Savers` + +* `--language`: + Set language of the Cask to install. The first matching language is used, otherwise the default language on the Cask. The default value is the `language of your system` + ## GLOBAL OPTIONS These options are applicable across multiple subcommands. @@ -1938,6 +1866,7 @@ See our issues on GitHub: [ESSENTIAL COMMANDS]: #ESSENTIAL-COMMANDS "ESSENTIAL COMMANDS" [COMMANDS]: #COMMANDS "COMMANDS" [DEVELOPER COMMANDS]: #DEVELOPER-COMMANDS "DEVELOPER COMMANDS" +[GLOBAL CASK OPTIONS]: #GLOBAL-CASK-OPTIONS "GLOBAL CASK OPTIONS" [GLOBAL OPTIONS]: #GLOBAL-OPTIONS "GLOBAL OPTIONS" [OFFICIAL EXTERNAL COMMANDS]: #OFFICIAL-EXTERNAL-COMMANDS "OFFICIAL EXTERNAL COMMANDS" [CUSTOM EXTERNAL COMMANDS]: #CUSTOM-EXTERNAL-COMMANDS "CUSTOM EXTERNAL COMMANDS" diff --git a/manpages/brew.1 b/manpages/brew.1 index ec67fdec6e..6f296021cb 100644 --- a/manpages/brew.1 +++ b/manpages/brew.1 @@ -172,66 +172,6 @@ Zaps all files associated with the given \fIcask\fR .P See also: \fBman brew\fR . -.TP -\fB\-\-appdir\fR -Target location for Applications\. Default: \fB/Applications\fR -. -.TP -\fB\-\-colorpickerdir\fR -Target location for Color Pickers\. Default: \fB~/Library/ColorPickers\fR -. -.TP -\fB\-\-prefpanedir\fR -Target location for Preference Panes\. Default: \fB~/Library/PreferencePanes\fR -. -.TP -\fB\-\-qlplugindir\fR -Target location for QuickLook Plugins\. Default: \fB~/Library/QuickLook\fR -. -.TP -\fB\-\-mdimporterdir\fR -Target location for Spotlight Plugins\. Default: \fB~/Library/Spotlight\fR -. -.TP -\fB\-\-dictionarydir\fR -Target location for Dictionaries\. Default: \fB~/Library/Dictionaries\fR -. -.TP -\fB\-\-fontdir\fR -Target location for Fonts\. Default: \fB~/Library/Fonts\fR -. -.TP -\fB\-\-servicedir\fR -Target location for Services\. Default: \fB~/Library/Services\fR -. -.TP -\fB\-\-input_methoddir\fR -Target location for Input Methods\. Default: \fB~/Library/Input Methods\fR -. -.TP -\fB\-\-internet_plugindir\fR -Target location for Internet Plugins\. Default: \fB~/Library/Internet Plug\-Ins\fR -. -.TP -\fB\-\-audio_unit_plugindir\fR -Target location for Audio Unit Plugins\. Default: \fB~/Library/Audio/Plug\-Ins/Components\fR -. -.TP -\fB\-\-vst_plugindir\fR -Target location for VST Plugins\. Default: \fB~/Library/Audio/Plug\-Ins/VST\fR -. -.TP -\fB\-\-vst3_plugindir\fR -Target location for VST3 Plugins\. Default: \fB~/Library/Audio/Plug\-Ins/VST3\fR -. -.TP -\fB\-\-screen_saverdir\fR -Target location for Screen Savers\. Default: \fB~/Library/Screen Savers\fR -. -.TP -\fB\-\-language\fR -Set language of the Cask to install\. The first matching language is used, otherwise the default language on the Cask\. The default value is the \fBlanguage of your system\fR -. .SS "\fBcleanup\fR [\fIoptions\fR] [\fIformula\fR|\fIcask\fR]" Remove stale lock files and outdated downloads for all formulae and casks, and remove old versions of installed formulae\. If arguments are specified, only do this for the given formulae and casks\. Removes all downloads more than 120 days old\. This can be adjusted with \fBHOMEBREW_CLEANUP_MAX_AGE_DAYS\fR\. . @@ -532,66 +472,6 @@ Create a Git repository, useful for creating patches to the software\. Treat all named arguments as casks\. . .TP -\fB\-\-appdir\fR -Target location for Applications\. Default: \fB/Applications\fR -. -.TP -\fB\-\-colorpickerdir\fR -Target location for Color Pickers\. Default: \fB~/Library/ColorPickers\fR -. -.TP -\fB\-\-prefpanedir\fR -Target location for Preference Panes\. Default: \fB~/Library/PreferencePanes\fR -. -.TP -\fB\-\-qlplugindir\fR -Target location for QuickLook Plugins\. Default: \fB~/Library/QuickLook\fR -. -.TP -\fB\-\-mdimporterdir\fR -Target location for Spotlight Plugins\. Default: \fB~/Library/Spotlight\fR -. -.TP -\fB\-\-dictionarydir\fR -Target location for Dictionaries\. Default: \fB~/Library/Dictionaries\fR -. -.TP -\fB\-\-fontdir\fR -Target location for Fonts\. Default: \fB~/Library/Fonts\fR -. -.TP -\fB\-\-servicedir\fR -Target location for Services\. Default: \fB~/Library/Services\fR -. -.TP -\fB\-\-input_methoddir\fR -Target location for Input Methods\. Default: \fB~/Library/Input Methods\fR -. -.TP -\fB\-\-internet_plugindir\fR -Target location for Internet Plugins\. Default: \fB~/Library/Internet Plug\-Ins\fR -. -.TP -\fB\-\-audio_unit_plugindir\fR -Target location for Audio Unit Plugins\. Default: \fB~/Library/Audio/Plug\-Ins/Components\fR -. -.TP -\fB\-\-vst_plugindir\fR -Target location for VST Plugins\. Default: \fB~/Library/Audio/Plug\-Ins/VST\fR -. -.TP -\fB\-\-vst3_plugindir\fR -Target location for VST3 Plugins\. Default: \fB~/Library/Audio/Plug\-Ins/VST3\fR -. -.TP -\fB\-\-screen_saverdir\fR -Target location for Screen Savers\. Default: \fB~/Library/Screen Savers\fR -. -.TP -\fB\-\-language\fR -Set language of the Cask to install\. The first matching language is used, otherwise the default language on the Cask\. The default value is the \fBlanguage of your system\fR -. -.TP \fB\-\-[no\-]binaries\fR Disable/enable linking of helper executables\. Default: enabled . @@ -826,66 +706,6 @@ Print install times for each formula at the end of the run\. Treat all named arguments as casks\. . .TP -\fB\-\-appdir\fR -Target location for Applications\. Default: \fB/Applications\fR -. -.TP -\fB\-\-colorpickerdir\fR -Target location for Color Pickers\. Default: \fB~/Library/ColorPickers\fR -. -.TP -\fB\-\-prefpanedir\fR -Target location for Preference Panes\. Default: \fB~/Library/PreferencePanes\fR -. -.TP -\fB\-\-qlplugindir\fR -Target location for QuickLook Plugins\. Default: \fB~/Library/QuickLook\fR -. -.TP -\fB\-\-mdimporterdir\fR -Target location for Spotlight Plugins\. Default: \fB~/Library/Spotlight\fR -. -.TP -\fB\-\-dictionarydir\fR -Target location for Dictionaries\. Default: \fB~/Library/Dictionaries\fR -. -.TP -\fB\-\-fontdir\fR -Target location for Fonts\. Default: \fB~/Library/Fonts\fR -. -.TP -\fB\-\-servicedir\fR -Target location for Services\. Default: \fB~/Library/Services\fR -. -.TP -\fB\-\-input_methoddir\fR -Target location for Input Methods\. Default: \fB~/Library/Input Methods\fR -. -.TP -\fB\-\-internet_plugindir\fR -Target location for Internet Plugins\. Default: \fB~/Library/Internet Plug\-Ins\fR -. -.TP -\fB\-\-audio_unit_plugindir\fR -Target location for Audio Unit Plugins\. Default: \fB~/Library/Audio/Plug\-Ins/Components\fR -. -.TP -\fB\-\-vst_plugindir\fR -Target location for VST Plugins\. Default: \fB~/Library/Audio/Plug\-Ins/VST\fR -. -.TP -\fB\-\-vst3_plugindir\fR -Target location for VST3 Plugins\. Default: \fB~/Library/Audio/Plug\-Ins/VST3\fR -. -.TP -\fB\-\-screen_saverdir\fR -Target location for Screen Savers\. Default: \fB~/Library/Screen Savers\fR -. -.TP -\fB\-\-language\fR -Set language of the Cask to install\. The first matching language is used, otherwise the default language on the Cask\. The default value is the \fBlanguage of your system\fR -. -.TP \fB\-\-[no\-]binaries\fR Disable/enable linking of helper executables\. Default: enabled . @@ -1098,66 +918,6 @@ Print install times for each formula at the end of the run\. Treat all named arguments as casks\. If no named arguments are specified, upgrade only outdated casks\. . .TP -\fB\-\-appdir\fR -Target location for Applications\. Default: \fB/Applications\fR -. -.TP -\fB\-\-colorpickerdir\fR -Target location for Color Pickers\. Default: \fB~/Library/ColorPickers\fR -. -.TP -\fB\-\-prefpanedir\fR -Target location for Preference Panes\. Default: \fB~/Library/PreferencePanes\fR -. -.TP -\fB\-\-qlplugindir\fR -Target location for QuickLook Plugins\. Default: \fB~/Library/QuickLook\fR -. -.TP -\fB\-\-mdimporterdir\fR -Target location for Spotlight Plugins\. Default: \fB~/Library/Spotlight\fR -. -.TP -\fB\-\-dictionarydir\fR -Target location for Dictionaries\. Default: \fB~/Library/Dictionaries\fR -. -.TP -\fB\-\-fontdir\fR -Target location for Fonts\. Default: \fB~/Library/Fonts\fR -. -.TP -\fB\-\-servicedir\fR -Target location for Services\. Default: \fB~/Library/Services\fR -. -.TP -\fB\-\-input_methoddir\fR -Target location for Input Methods\. Default: \fB~/Library/Input Methods\fR -. -.TP -\fB\-\-internet_plugindir\fR -Target location for Internet Plugins\. Default: \fB~/Library/Internet Plug\-Ins\fR -. -.TP -\fB\-\-audio_unit_plugindir\fR -Target location for Audio Unit Plugins\. Default: \fB~/Library/Audio/Plug\-Ins/Components\fR -. -.TP -\fB\-\-vst_plugindir\fR -Target location for VST Plugins\. Default: \fB~/Library/Audio/Plug\-Ins/VST\fR -. -.TP -\fB\-\-vst3_plugindir\fR -Target location for VST3 Plugins\. Default: \fB~/Library/Audio/Plug\-Ins/VST3\fR -. -.TP -\fB\-\-screen_saverdir\fR -Target location for Screen Savers\. Default: \fB~/Library/Screen Savers\fR -. -.TP -\fB\-\-language\fR -Set language of the Cask to install\. The first matching language is used, otherwise the default language on the Cask\. The default value is the \fBlanguage of your system\fR -. -.TP \fB\-\-[no\-]binaries\fR Disable/enable linking of helper executables\. Default: enabled . @@ -2064,6 +1824,69 @@ Use the commit at the specified \fIdate\fR as the start commit\. .SS "\fBvendor\-gems\fR" Install and commit Homebrew\'s vendored gems\. . +.SH "GLOBAL CASK OPTIONS" +These options are applicable to subcommands accepting a \fB\-\-cask\fR flag and all \fBcask\fR commands\. +. +.TP +\fB\-\-appdir=\fR +Target location for Applications\. Default: \fB/Applications\fR +. +.TP +\fB\-\-colorpickerdir=\fR +Target location for Color Pickers\. Default: \fB~/Library/ColorPickers\fR +. +.TP +\fB\-\-prefpanedir=\fR +Target location for Preference Panes\. Default: \fB~/Library/PreferencePanes\fR +. +.TP +\fB\-\-qlplugindir=\fR +Target location for QuickLook Plugins\. Default: \fB~/Library/QuickLook\fR +. +.TP +\fB\-\-mdimporterdir=\fR +Target location for Spotlight Plugins\. Default: \fB~/Library/Spotlight\fR +. +.TP +\fB\-\-dictionarydir=\fR +Target location for Dictionaries\. Default: \fB~/Library/Dictionaries\fR +. +.TP +\fB\-\-fontdir=\fR +Target location for Fonts\. Default: \fB~/Library/Fonts\fR +. +.TP +\fB\-\-servicedir=\fR +Target location for Services\. Default: \fB~/Library/Services\fR +. +.TP +\fB\-\-input_methoddir=\fR +Target location for Input Methods\. Default: \fB~/Library/Input Methods\fR +. +.TP +\fB\-\-internet_plugindir=\fR +Target location for Internet Plugins\. Default: \fB~/Library/Internet Plug\-Ins\fR +. +.TP +\fB\-\-audio_unit_plugindir=\fR +Target location for Audio Unit Plugins\. Default: \fB~/Library/Audio/Plug\-Ins/Components\fR +. +.TP +\fB\-\-vst_plugindir=\fR +Target location for VST Plugins\. Default: \fB~/Library/Audio/Plug\-Ins/VST\fR +. +.TP +\fB\-\-vst3_plugindir=\fR +Target location for VST3 Plugins\. Default: \fB~/Library/Audio/Plug\-Ins/VST3\fR +. +.TP +\fB\-\-screen_saverdir=\fR +Target location for Screen Savers\. Default: \fB~/Library/Screen Savers\fR +. +.TP +\fB\-\-language\fR +Set language of the Cask to install\. The first matching language is used, otherwise the default language on the Cask\. The default value is the \fBlanguage of your system\fR +. .SH "GLOBAL OPTIONS" These options are applicable across multiple subcommands\. .