2009-10-26 10:54:32 -04:00
#compdef brew
2015-08-17 15:29:50 +08:00
#autoload
2009-10-26 10:54:32 -04:00
# Brew ZSH completion function
2023-02-19 16:22:39 -05:00
# This file is automatically generated by running `brew generate-man-completions`.
# See Library/Homebrew/completions/zsh.erb for editing instructions.
2009-10-26 10:54:32 -04:00
2016-09-12 05:28:14 -05:00
# functions starting with __brew are helper functions that complete or list
# various types of items.
# functions starting with _brew_ are completions for brew commands
# this mechanism can be extended by external commands by defining a function
# named _brew_<external-name>. See _brew_cask for an example of this.
# a list of aliased internal commands
__brew_list_aliases() {
local -a aliases
aliases=(
ls list
homepage home
'-S' search
up update
ln link
instal install
2021-01-24 01:59:31 -05:00
uninstal uninstall
2023-07-28 11:26:09 +01:00
post_install postinstall
2016-09-12 05:28:14 -05:00
rm uninstall
remove uninstall
abv info
dr doctor
'--repo' '--repository'
environment '--env'
'--config' config
'-v' '--version'
2021-07-14 22:00:01 +05:30
lc livecheck
2021-01-24 01:59:31 -05:00
tc typecheck
2016-09-12 05:28:14 -05:00
)
echo "${aliases}"
}
2018-06-11 15:35:55 -04:00
__brew_formulae_or_ruby_files() {
2021-01-24 01:59:31 -05:00
_alternative 'files:files:{_files -g "*.rb"}'
2018-06-11 15:35:55 -04:00
}
2018-12-13 09:11:33 +01:00
# completions remain in cache until any tap has new commits
2018-12-13 08:44:27 +01:00
__brew_completion_caching_policy() {
2019-03-05 10:57:19 -06:00
local -a tmp
# invalidate if cache file is missing or >=2 weeks old
tmp=( $1(mw-2N) )
(( $#tmp )) || return 0
2020-06-17 23:02:46 +03:00
# otherwise, invalidate if latest tap index file is missing or newer than cache file
2021-04-04 21:50:31 +02:00
tmp=( $(brew --repository)/Library/Taps/*/*/.git/index(om[1]N) )
2019-03-05 10:57:19 -06:00
[[ -z $tmp || $tmp -nt $1 ]]
2018-12-10 22:35:14 +01:00
}
2016-09-12 05:28:14 -05:00
__brew_formulae() {
2021-01-27 13:43:47 +11:00
[[ -prefix '-' ]] && return 0
2020-06-17 23:02:46 +03:00
local -a list
2018-12-10 22:35:14 +01:00
local comp_cachename=brew_formulae
2020-06-17 23:02:46 +03:00
if ! _retrieve_cache $comp_cachename; then
2020-10-24 18:34:03 -06:00
list=( $(brew formulae) )
2020-06-17 23:02:46 +03:00
_store_cache $comp_cachename list
2018-12-10 22:35:14 +01:00
fi
2020-06-17 23:02:46 +03:00
_describe -t formulae 'all formulae' list
2016-09-12 05:28:14 -05:00
}
__brew_installed_formulae() {
2021-01-27 13:43:47 +11:00
[[ -prefix '-' ]] && return 0
2016-09-12 05:28:14 -05:00
local -a formulae
2020-10-05 00:49:53 +06:00
formulae=($(brew list --formula))
2016-09-12 05:28:14 -05:00
_describe -t formulae 'installed formulae' formulae
}
2021-01-24 01:59:31 -05:00
__brew_outdated_formulae() {
2021-01-27 13:43:47 +11:00
[[ -prefix '-' ]] && return 0
2021-01-24 01:59:31 -05:00
local -a formulae
2024-01-27 18:42:22 -05:00
formulae=($(HOMEBREW_NO_AUTO_UPDATE=1 brew outdated --formula))
2021-01-24 01:59:31 -05:00
_describe -t formulae 'outdated formulae' formulae
}
__brew_casks() {
2021-01-27 13:43:47 +11:00
[[ -prefix '-' ]] && return 0
2021-01-02 18:58:27 +09:00
local -a list
local expl
local comp_cachename=brew_casks
if ! _retrieve_cache $comp_cachename; then
2021-04-09 18:04:37 +00:00
list=( $(brew casks) )
2021-01-02 18:58:27 +09:00
_store_cache $comp_cachename list
fi
_wanted list expl 'all casks' compadd -a list
}
2020-10-05 00:49:53 +06:00
__brew_installed_casks() {
2021-01-27 13:43:47 +11:00
[[ -prefix '-' ]] && return 0
2020-10-05 00:49:53 +06:00
local -a list
local expl
2024-01-09 09:30:59 +00:00
list=( $(brew list --cask 2>/dev/null) )
2020-10-05 00:49:53 +06:00
_wanted list expl 'installed casks' compadd -a list
}
2021-01-24 20:30:33 -08:00
__brew_outdated_casks() {
2021-01-27 13:43:47 +11:00
[[ -prefix '-' ]] && return 0
2021-01-24 20:30:33 -08:00
local -a casks
2024-01-27 18:42:22 -05:00
casks=($(HOMEBREW_NO_AUTO_UPDATE=1 brew outdated --cask 2>/dev/null))
2021-01-24 20:30:33 -08:00
_describe -t casks 'outdated casks' casks
}
2016-09-12 05:28:14 -05:00
__brew_installed_taps() {
2021-01-27 13:43:47 +11:00
[[ -prefix '-' ]] && return 0
2016-09-12 05:28:14 -05:00
local -a taps
taps=($(brew tap))
_describe -t installed-taps 'installed taps' taps
}
__brew_any_tap() {
2021-01-27 13:43:47 +11:00
[[ -prefix '-' ]] && return 0
2016-09-12 05:28:14 -05:00
_alternative \
2018-03-31 13:42:33 +01:00
'installed-taps:installed taps:__brew_installed_taps'
2016-09-12 05:28:14 -05:00
}
2021-01-24 01:59:31 -05:00
__brew_internal_commands() {
2016-09-12 05:28:14 -05:00
local -a commands
commands=(
2021-01-24 01:59:31 -05:00
'--cache:Display Homebrew'\''s download cache'
'--caskroom:Display Homebrew'\''s Caskroom path'
'--cellar:Display Homebrew'\''s Cellar path'
'--env:Summarise Homebrew'\''s build environment as a plain list'
'--prefix:Display Homebrew'\''s install path'
2023-09-09 12:09:38 -04:00
'--repository:Display where Homebrew'\''s Git repository is located'
2021-01-24 01:59:31 -05:00
'--version:Print the version numbers of Homebrew, Homebrew/homebrew-core and Homebrew/homebrew-cask (if tapped) to standard output'
2025-02-07 19:42:46 +00:00
'alias:Show existing aliases'
2021-01-24 01:59:31 -05:00
'analytics:Control Homebrew'\''s anonymous aggregate user behaviour analytics'
2025-02-03 17:40:17 +01:00
'audit:Check formula or cask for Homebrew coding style violations'
2021-01-24 01:59:31 -05:00
'autoremove:Uninstall formulae that were only installed as a dependency of another formula and are now no longer needed'
'bottle:Generate a bottle (binary package) from a formula that was installed with `--build-bottle`'
2024-07-15 19:56:06 +00:00
'bump:Displays out-of-date packages and the latest version available'
2021-01-24 01:59:31 -05:00
'bump-cask-pr:Create a pull request to update cask with a new version'
'bump-formula-pr:Create a pull request to update formula with a new URL or a new tag'
'bump-revision:Create a commit to increment the revision of formula'
'bump-unversioned-casks:Check all casks with unversioned URLs in a given tap for updates'
2025-03-19 07:11:41 +00:00
'bundle:Bundler for non-Ruby dependencies from Homebrew, Homebrew Cask, Mac App Store, Whalebrew and Visual Studio Code'
2021-01-24 01:59:31 -05:00
'casks:List all locally installable casks including short names'
'cat:Display the source of a formula or cask'
'cleanup:Remove stale lock files and outdated downloads for all formulae and casks, and remove old versions of installed formulae'
'command:Display the path to the file being used when invoking `brew` cmd'
'commands:Show lists of built-in and external commands'
'completions:Control whether Homebrew automatically links external tap shell completion files'
'config:Show Homebrew and system configuration info useful for debugging'
2023-09-09 12:09:38 -04:00
'contributions:Summarise contributions to Homebrew repositories'
2021-01-24 01:59:31 -05:00
'create:Generate a formula or, with `--cask`, a cask for the downloadable file at URL and open it in the editor'
2024-08-15 14:29:45 +00:00
'debugger:Run the specified Homebrew command in debug mode'
2021-01-24 01:59:31 -05:00
'deps:Show dependencies for formula'
'desc:Display formula'\''s name and one-line description'
2023-04-03 12:43:09 +00:00
'determine-test-runners:Determines the runners used to test formulae or their dependents'
2021-07-14 01:09:03 -04:00
'developer:Control Homebrew'\''s developer mode'
2021-01-24 01:59:31 -05:00
'dispatch-build-bottle:Build bottles for these formulae with GitHub Actions'
2023-09-09 12:09:38 -04:00
'docs:Open Homebrew'\''s online documentation at https://docs.brew.sh in a browser'
2021-01-24 01:59:31 -05:00
'doctor:Check your system for potential problems'
2023-07-31 20:26:29 -04:00
'edit:Open a formula, cask or tap in the editor set by `EDITOR` or `HOMEBREW_EDITOR`, or open the Homebrew repository for editing if no argument is provided'
2021-01-24 01:59:31 -05:00
'extract:Look through repository history to find the most recent version of formula and create a copy in tap'
'fetch:Download a bottle (if available) or source packages for formulae and binaries for casks'
'formula:Display the path where formula is located'
2025-02-09 00:11:25 +00:00
'formula-analytics:Query Homebrew'\''s analytics'
2021-01-24 01:59:31 -05:00
'formulae:List all locally installable formulae including short names'
2025-02-09 00:11:25 +00:00
'generate-analytics-api:Generates analytics API data files for formulae.brew.sh'
2023-09-09 12:09:38 -04:00
'generate-cask-api:Generate `homebrew/cask` API data files for https://formulae.brew.sh'
2024-11-17 08:43:42 +00:00
'generate-cask-ci-matrix:Generate a GitHub Actions matrix for a given pull request URL or list of cask names'
2023-09-09 12:09:38 -04:00
'generate-formula-api:Generate `homebrew/core` API data files for https://formulae.brew.sh'
2021-05-04 17:35:09 +00:00
'generate-man-completions:Generate Homebrew'\''s manpages and shell completions'
2021-01-24 01:59:31 -05:00
'gist-logs:Upload logs for a failed build of formula to a new Gist'
2024-04-08 13:35:25 +01:00
'help:Outputs the usage instructions for `brew` command'
2021-01-24 01:59:31 -05:00
'home:Open a formula or cask'\''s homepage in a browser, or open Homebrew'\''s own homepage if no argument is provided'
'info:Display brief statistics for your Homebrew installation'
'install:Install a formula or cask'
'install-bundler-gems:Install Homebrew'\''s Bundler gems'
'irb:Enter the interactive Homebrew Ruby shell'
2023-06-20 15:21:55 +00:00
'leaves:List installed formulae that are not dependencies of another installed formula or cask'
2021-01-24 01:59:31 -05:00
'link:Symlink all of formula'\''s installed files into Homebrew'\''s prefix'
'linkage:Check the library links from the given formula kegs'
'list:List all installed formulae and casks'
'livecheck:Check for newer versions of formulae and/or casks from upstream'
2021-09-30 08:15:06 +00:00
'log:Show the `git log` for formula or cask, or show the log for the Homebrew repository if no formula or cask is provided'
2021-01-24 01:59:31 -05:00
'migrate:Migrate renamed packages to new names, where formula are old names of packages'
'missing:Check the given formula kegs for missing dependencies'
2025-01-27 15:12:50 +00:00
'nodenv-sync:Create symlinks for Homebrew'\''s installed NodeJS versions in `~/.nodenv/versions`'
2021-01-24 01:59:31 -05:00
'options:Show install options specific to formula'
'outdated:List installed casks and formulae that have an updated version available'
'pin:Pin the specified formula, preventing them from being upgraded when issuing the `brew upgrade` formula command'
'postinstall:Rerun the post-install steps for formula'
'pr-automerge:Find pull requests that can be automatically merged using `brew pr-publish`'
'pr-publish:Publish bottles for a pull request with GitHub Actions'
2024-04-30 11:10:23 +02:00
'pr-pull:Download and publish bottles and apply the bottle commit from a pull request with artifacts generated by GitHub Actions'
2021-03-10 16:08:45 +00:00
'pr-upload:Apply the bottle commit and publish bottles to a host'
2021-01-24 01:59:31 -05:00
'prof:Run Homebrew with a Ruby profiler'
2025-01-27 15:12:50 +00:00
'pyenv-sync:Create symlinks for Homebrew'\''s installed Python versions in `~/.pyenv/versions`'
'rbenv-sync:Create symlinks for Homebrew'\''s installed Ruby versions in `~/.rbenv/versions`'
2021-01-24 01:59:31 -05:00
'readall:Import all items from the specified tap, or from all installed taps if none is provided'
'reinstall:Uninstall and then reinstall a formula or cask using the same options it was originally installed with, plus any appended options specific to a formula'
'release:Create a new draft Homebrew/brew release with the appropriate version number and release notes'
'rubocop:Installs, configures and runs Homebrew'\''s `rubocop`'
'ruby:Run a Ruby instance with Homebrew'\''s libraries loaded'
2024-04-26 18:23:27 +00:00
'rubydoc:Generate Homebrew'\''s RubyDoc documentation'
2021-01-24 01:59:31 -05:00
'search:Perform a substring search of cask tokens and formula names for text'
2025-03-14 08:43:39 +00:00
'services:Manage background services with macOS'\'' `launchctl`(1) daemon manager or Linux'\''s `systemctl`(1) service manager'
2023-10-27 12:01:23 +00:00
'setup-ruby:Installs and configures Homebrew'\''s Ruby'
2021-01-24 12:38:32 -05:00
'sh:Enter an interactive shell for Homebrew'\''s build environment'
2024-07-14 16:18:26 -04:00
'shellenv:Valid shells: bash|csh|fish|pwsh|sh|tcsh|zsh Print export statements'
2021-01-24 01:59:31 -05:00
'style:Check formulae or files for conformance to Homebrew style guidelines'
2024-07-13 14:55:53 +00:00
'tab:Edit tab information for installed formulae or casks'
2021-01-24 01:59:31 -05:00
'tap:Tap a formula repository'
'tap-info:Show detailed information about one or more taps'
'tap-new:Generate the template files for a new tap'
'test:Run the test method provided by an installed formula'
'tests:Run Homebrew'\''s unit and integration tests'
'typecheck:Check for typechecking errors using Sorbet'
2025-02-07 19:42:46 +00:00
'unalias:Remove aliases'
2021-01-26 15:21:24 -05:00
'unbottled:Show the unbottled dependents of formulae'
2021-01-24 01:59:31 -05:00
'uninstall:Uninstall a formula or cask'
'unlink:Remove symlinks for formula from Homebrew'\''s prefix'
'unpack:Unpack the source files for formula into subdirectories of the current working directory'
'unpin:Unpin formula, allowing them to be upgraded by `brew upgrade` formula'
'untap:Remove a tapped formula repository'
'update:Fetch the newest version of Homebrew and all formulae from GitHub using `git`(1) and perform any necessary migrations'
'update-license-data:Update SPDX license data in the Homebrew repository'
2021-02-04 17:49:38 +05:30
'update-maintainers:Update the list of maintainers in the `Homebrew/brew` README'
2021-01-24 01:59:31 -05:00
'update-python-resources:Update versions for PyPI resource blocks in formula'
'update-report:The Ruby implementation of `brew update`'
2021-01-28 01:51:40 -05:00
'update-reset:Fetch and reset Homebrew and all tap repositories (or any specified repository) using `git`(1) to their latest `origin/HEAD`'
2022-09-02 08:24:33 +01:00
'update-sponsors:Update the list of GitHub Sponsors in the `Homebrew/brew` README'
2021-01-24 01:59:31 -05:00
'update-test:Run a test of `brew update` with a new repository clone'
'upgrade:Upgrade outdated casks and outdated, unpinned formulae using the same options they were originally installed with, plus any appended brew formula options'
2021-01-24 12:38:32 -05:00
'uses:Show formulae and casks that specify formula as a dependency; that is, show dependents of formula'
2021-01-24 01:59:31 -05:00
'vendor-gems:Install and commit Homebrew'\''s vendored gems'
'vendor-install:Install Homebrew'\''s portable Ruby'
2025-02-04 15:38:49 +00:00
'verify:Verify the build provenance of bottles using GitHub'\''s attestation tools'
2016-09-12 05:28:14 -05:00
)
2021-01-24 01:59:31 -05:00
_describe -t internal-commands 'internal commands' commands
2016-09-12 05:28:14 -05:00
}
2021-01-24 01:59:31 -05:00
__brew_external_commands() {
2020-06-17 23:02:46 +03:00
local -a list
2018-12-09 00:22:47 +01:00
local comp_cachename=brew_all_commands
2020-06-17 23:02:46 +03:00
if ! _retrieve_cache $comp_cachename; then
local cache_dir=$(brew --cache)
2021-01-24 01:59:31 -05:00
[[ -f $cache_dir/external_commands_list.txt ]] &&
list=( $(<$cache_dir/external_commands_list.txt) )
2020-06-17 23:02:46 +03:00
_store_cache $comp_cachename list
2018-12-09 00:22:47 +01:00
fi
2020-06-17 23:02:46 +03:00
_describe -t all-commands 'all commands' list
2016-09-12 05:28:14 -05:00
}
__brew_commands() {
_alternative \
2021-01-24 01:59:31 -05:00
'internal-commands:command:__brew_internal_commands' \
'external-commands:command:__brew_external_commands'
}
__brew_diagnostic_checks() {
local -a diagnostic_checks
diagnostic_checks=($(brew doctor --list-checks))
_describe -t diagnostic-checks 'diagnostic checks' diagnostic_checks
2016-09-12 05:28:14 -05:00
}
# brew --cache
_brew___cache() {
2021-01-24 01:59:31 -05:00
_arguments \
2021-09-10 18:59:42 +00:00
'(--build-from-source --force-bottle --bottle-tag --cask)--HEAD[Show the cache file used when building from HEAD]' \
2023-10-12 07:58:25 -04:00
'(--bottle-tag)--arch[Show cache file for the given CPU architecture. (Pass `all` to show cache files for all architectures.)]' \
2023-07-10 17:53:39 +00:00
'(--build-from-source --force-bottle --HEAD --cask --os --arch)--bottle-tag[Show the cache file used when pouring a bottle for the given tag]' \
2021-09-10 18:59:42 +00:00
'(--force-bottle --bottle-tag --HEAD --cask)--build-from-source[Show the cache file used when building from source]' \
2021-01-24 01:59:31 -05:00
'--debug[Display any debugging information]' \
2021-09-10 18:59:42 +00:00
'(--build-from-source --bottle-tag --HEAD --cask)--force-bottle[Show the cache file used when pouring a bottle]' \
2021-01-24 01:59:31 -05:00
'--help[Show this message]' \
2023-10-12 07:58:25 -04:00
'(--bottle-tag)--os[Show cache file for the given operating system. (Pass `all` to show cache files for all operating systems.)]' \
2021-01-24 01:59:31 -05:00
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]' \
2021-03-14 01:39:33 +05:30
- formula \
'(--cask)--formula[Only show cache files for formulae]' \
'*::formula:__brew_formulae' \
- cask \
2021-09-10 18:59:42 +00:00
'(--build-from-source --force-bottle --bottle-tag --HEAD --formula)--cask[Only show cache files for casks]' \
2021-03-14 01:39:33 +05:30
'*::cask:__brew_casks'
2021-01-24 01:59:31 -05:00
}
# brew --caskroom
_brew___caskroom() {
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]' \
2021-03-14 01:39:33 +05:30
- cask \
'*::cask:__brew_casks'
2016-09-12 05:28:14 -05:00
}
# brew --cellar
_brew___cellar() {
2021-01-24 01:59:31 -05:00
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]' \
2021-03-14 01:39:33 +05:30
- formula \
'*::formula:__brew_formulae'
2021-01-24 01:59:31 -05:00
}
# brew --config
_brew___config() {
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]'
2016-09-12 05:28:14 -05:00
}
# brew --env
_brew___env() {
2021-01-24 01:59:31 -05:00
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--plain[Generate plain output even when piped]' \
'--quiet[Make some output more quiet]' \
'--shell[Generate a list of environment variables for the specified shell, or `--shell=auto` to detect the current shell]' \
'--verbose[Make some output more verbose]' \
2021-03-14 01:39:33 +05:30
- formula \
'*::formula:__brew_formulae'
2016-09-12 05:28:14 -05:00
}
# brew --prefix
_brew___prefix() {
2021-01-24 01:59:31 -05:00
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
2021-01-30 08:58:04 +08:00
'(--unbrewed)--installed[Outputs nothing and returns a failing status code if formula is not installed]' \
2021-01-24 01:59:31 -05:00
'--quiet[Make some output more quiet]' \
2021-01-30 08:58:04 +08:00
'(--installed)--unbrewed[List files in Homebrew'\''s prefix not installed by Homebrew]' \
2021-01-24 01:59:31 -05:00
'--verbose[Make some output more verbose]' \
2021-03-14 01:39:33 +05:30
- formula \
'*::formula:__brew_formulae'
2021-01-24 01:59:31 -05:00
}
# brew --repo
_brew___repo() {
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]' \
2021-03-14 01:39:33 +05:30
- tap \
'*::tap:__brew_any_tap'
2016-09-12 05:28:14 -05:00
}
# brew --repository
_brew___repository() {
2021-01-24 01:59:31 -05:00
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]' \
2021-03-14 01:39:33 +05:30
- tap \
'*::tap:__brew_any_tap'
2016-09-12 05:28:14 -05:00
}
2024-07-14 16:18:26 -04:00
# brew --version
_brew___version() {
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]'
}
2021-01-24 01:59:31 -05:00
# brew -S
_brew__s() {
_arguments \
2021-10-20 00:06:39 +00:00
'(--repology --macports --fink --opensuse --fedora --debian --ubuntu)--archlinux[Search for text in the given database]' \
2023-04-12 00:00:48 +01:00
'--cask[Search for casks]' \
2021-01-27 13:45:11 +11:00
'(--open)--closed[Search for only closed GitHub pull requests]' \
2021-10-20 00:06:39 +00:00
'(--repology --macports --fink --opensuse --fedora --archlinux --ubuntu)--debian[Search for text in the given database]' \
2021-01-24 01:59:31 -05:00
'--debug[Display any debugging information]' \
2022-03-23 00:03:11 -04:00
'(--pull-request)--desc[Search for formulae with a description matching text and casks with a name or description matching text]' \
2025-01-27 14:21:27 +00:00
'--eval-all[Evaluate all available formulae and casks, whether installed or not, to search their descriptions. Implied if `$HOMEBREW_EVAL_ALL` is set]' \
2021-10-20 00:06:39 +00:00
'(--repology --macports --fink --opensuse --archlinux --debian --ubuntu)--fedora[Search for text in the given database]' \
'(--repology --macports --opensuse --fedora --archlinux --debian --ubuntu)--fink[Search for text in the given database]' \
2023-04-12 00:00:48 +01:00
'--formula[Search for formulae]' \
2021-01-24 01:59:31 -05:00
'--help[Show this message]' \
2021-10-20 00:06:39 +00:00
'(--repology --fink --opensuse --fedora --archlinux --debian --ubuntu)--macports[Search for text in the given database]' \
2021-01-27 13:45:11 +11:00
'(--closed)--open[Search for only open GitHub pull requests]' \
2021-10-20 00:06:39 +00:00
'(--repology --macports --fink --fedora --archlinux --debian --ubuntu)--opensuse[Search for text in the given database]' \
2021-01-27 13:45:11 +11:00
'(--desc)--pull-request[Search for GitHub pull requests containing text]' \
2021-01-24 01:59:31 -05:00
'--quiet[Make some output more quiet]' \
2021-10-20 00:06:39 +00:00
'(--macports --fink --opensuse --fedora --archlinux --debian --ubuntu)--repology[Search for text in the given database]' \
'(--repology --macports --fink --opensuse --fedora --archlinux --debian)--ubuntu[Search for text in the given database]' \
2021-01-24 01:59:31 -05:00
'--verbose[Make some output more verbose]'
}
2024-07-14 16:18:26 -04:00
# brew -v
_brew__v() {
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]'
}
2021-01-24 01:59:31 -05:00
# brew abv
_brew_abv() {
_arguments \
2025-01-27 14:21:27 +00:00
'--analytics[List global Homebrew analytics data or, if specified, installation and build error data for formula (provided neither `$HOMEBREW_NO_ANALYTICS` nor `$HOMEBREW_NO_GITHUB_API` are set)]' \
2021-01-24 01:59:31 -05:00
'--category[Which type of analytics data to retrieve. The value for category must be `install`, `install-on-request` or `build-error`; `cask-install` or `os-version` may be specified if formula is not. The default is `install`]' \
'--days[How many days of analytics data to retrieve. The value for days must be `30`, `90` or `365`. The default is `30`]' \
'--debug[Display any debugging information]' \
2025-01-27 14:21:27 +00:00
'(--installed)--eval-all[Evaluate all available formulae and casks, whether installed or not, to print their JSON. Implied if `$HOMEBREW_EVAL_ALL` is set]' \
2024-08-26 16:59:37 -04:00
'(--cask --json)--fetch-manifest[Fetch GitHub Packages manifest for extra information when formula is not installed]' \
2023-02-10 12:07:36 -05:00
'--github[Open the GitHub source page for formula and cask in a browser. To view the history locally: `brew log -p` formula or cask]' \
2021-01-24 01:59:31 -05:00
'--help[Show this message]' \
2022-09-05 13:57:22 +01:00
'(--eval-all --all)--installed[Print JSON of formulae that are currently installed]' \
2024-08-26 16:59:37 -04:00
'(--fetch-manifest)--json[Print a JSON representation. Currently the default value for version is `v1` for formula. For formula and cask use `v2`. See the docs for examples of using the JSON output: https://docs.brew.sh/Querying-Brew]' \
2021-01-24 01:59:31 -05:00
'--quiet[Make some output more quiet]' \
2022-07-21 16:41:15 +02:00
'--variations[Include the variations hash in each formula'\''s JSON output]' \
2021-01-24 01:59:31 -05:00
'--verbose[Show more verbose analytics data for formula]' \
2021-03-14 01:39:33 +05:30
- formula \
'(--cask)--formula[Treat all named arguments as formulae]' \
'*::formula:__brew_formulae' \
- cask \
2024-08-26 16:59:37 -04:00
'(--formula --fetch-manifest)--cask[Treat all named arguments as casks]' \
2021-03-14 01:39:33 +05:30
'*::cask:__brew_casks'
2021-01-24 01:59:31 -05:00
}
2025-02-07 19:42:46 +00:00
# brew alias
_brew_alias() {
_arguments \
'--debug[Display any debugging information]' \
'--edit[Edit aliases in a text editor. Either one or all aliases may be opened at once. If the given alias doesn'\''t exist it'\''ll be pre-populated with a template]' \
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]'
}
2021-01-24 01:59:31 -05:00
# brew analytics
_brew_analytics() {
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]' \
2021-03-14 01:39:33 +05:30
- subcommand \
'*::subcommand:(state on off regenerate-uuid)'
2016-09-12 05:28:14 -05:00
}
2021-01-24 01:59:31 -05:00
# brew audit
2016-09-12 05:28:14 -05:00
_brew_audit() {
_arguments \
2023-05-19 13:04:26 +00:00
'--arch[Audit the given CPU architecture. (Pass `all` to audit all architectures.)]' \
2021-01-24 01:59:31 -05:00
'--audit-debug[Enable debugging and profiling of audit methods]' \
'--debug[Display any debugging information]' \
'--display-filename[Prefix every line of output with the file or formula name being audited, to make output easy to grep]' \
2023-02-10 23:15:40 -05:00
'--eval-all[Evaluate all available formulae and casks, whether installed or not, to audit them. Implied if `HOMEBREW_EVAL_ALL` is set]' \
2021-01-27 13:45:11 +11:00
'(--only)--except[Specify a comma-separated method list to skip running the methods named `audit_`method]' \
2023-04-11 08:24:24 +00:00
'(--only-cops --strict --only-cops --only)--except-cops[Specify a comma-separated cops list to skip checking for violations of the listed RuboCop cops]' \
2021-01-24 01:59:31 -05:00
'--fix[Fix style violations automatically using RuboCop'\''s auto-correct feature]' \
'--git[Run additional, slower style checks that navigate the Git repository]' \
'--help[Show this message]' \
2022-03-08 19:24:55 +00:00
'(--all)--installed[Only check formulae and casks that are currently installed]' \
2023-12-06 20:28:11 +00:00
'--new[Run various additional style checks to determine if a new formula or cask is eligible for Homebrew. This should be used when creating new formulae or casks and implies `--strict` and `--online`]' \
2025-02-05 13:39:02 +01:00
'--no-signing[Audit for app signatures, which are required by macOS on ARM]' \
2021-01-24 01:59:31 -05:00
'--online[Run additional, slower style checks that require a network connection]' \
2021-01-27 13:45:11 +11:00
'(--except --only-cops --except-cops)--only[Specify a comma-separated method list to only run the methods named `audit_`method]' \
2023-04-11 08:24:24 +00:00
'(--except-cops --strict --except-cops --only)--only-cops[Specify a comma-separated cops list to check for violations of only the listed RuboCop cops]' \
2023-05-19 13:04:26 +00:00
'--os[Audit the given operating system. (Pass `all` to audit all operating systems.)]' \
2021-01-24 01:59:31 -05:00
'--quiet[Make some output more quiet]' \
2025-02-05 13:39:02 +01:00
'--signing[Audit for app signatures, which are required by macOS on ARM]' \
2023-04-11 08:24:24 +00:00
'--skip-style[Skip running non-RuboCop style checks. Useful if you plan on running `brew style` separately. Enabled by default unless a formula is specified by name]' \
2021-01-27 13:45:11 +11:00
'(--only-cops --except-cops)--strict[Run additional, stricter style checks]' \
2025-02-03 17:40:17 +01:00
'--tap[Check formulae and casks within the given tap, specified as user`/`repo]' \
2021-01-24 01:59:31 -05:00
'--token-conflicts[Audit for token conflicts]' \
'--verbose[Make some output more verbose]' \
2021-03-14 01:39:33 +05:30
- formula \
'(--cask)--formula[Treat all named arguments as formulae]' \
'*::formula:__brew_formulae' \
- cask \
'(--formula)--cask[Treat all named arguments as casks]' \
'*::cask:__brew_casks'
2021-01-24 01:59:31 -05:00
}
# brew autoremove
_brew_autoremove() {
2016-09-12 05:28:14 -05:00
_arguments \
2021-01-24 01:59:31 -05:00
'--debug[Display any debugging information]' \
'--dry-run[List what would be uninstalled, but do not actually uninstall anything]' \
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]'
2016-09-12 05:28:14 -05:00
}
2021-01-24 01:59:31 -05:00
# brew bottle
_brew_bottle() {
2016-09-12 05:28:14 -05:00
_arguments \
2021-04-01 17:14:57 +00:00
'--committer[Specify a committer name and email in `git`'\''s standard author format]' \
2021-01-24 01:59:31 -05:00
'--debug[Display any debugging information]' \
'--force-core-tap[Build a bottle even if formula is not in `homebrew/core` or any installed taps]' \
'--help[Show this message]' \
'--json[Write bottle information to a JSON file, which can be used as the value for `--merge`]' \
2021-01-27 13:45:11 +11:00
'(--no-rebuild)--keep-old[If the formula specifies a rebuild version, attempt to preserve its value in the generated DSL]' \
2021-01-24 01:59:31 -05:00
'--merge[Generate an updated bottle block for a formula and optionally merge it into the formula file. Instead of a formula name, requires the path to a JSON file generated with `brew bottle --json` formula]' \
2022-11-04 18:46:43 +00:00
'--no-all-checks[Don'\''t try to create an `all` bottle or stop a no-change upload]' \
2021-01-24 01:59:31 -05:00
'--no-commit[When passed with `--write`, a new commit will not generated after writing changes to the formula file]' \
2021-01-27 13:45:11 +11:00
'(--keep-old)--no-rebuild[If the formula specifies a rebuild version, remove it from the generated DSL]' \
2021-03-30 17:35:13 +01:00
'--only-json-tab[When passed with `--json`, the tab will be written to the JSON file but not the bottle]' \
2021-01-24 01:59:31 -05:00
'--quiet[Make some output more quiet]' \
'--root-url[Use the specified URL as the root of the bottle'\''s URL instead of Homebrew'\''s default]' \
2021-04-29 18:58:20 +00:00
'--root-url-using[Use the specified download strategy class for downloading the bottle'\''s URL instead of Homebrew'\''s default]' \
2021-01-24 01:59:31 -05:00
'--skip-relocation[Do not check if the bottle can be marked as relocatable]' \
'--verbose[Make some output more verbose]' \
'--write[Write changes to the formula file. A new commit will be generated unless `--no-commit` is passed]' \
2021-03-14 01:39:33 +05:30
- installed_formula \
'*::installed_formula:__brew_installed_formulae' \
- file \
'*::file:__brew_formulae_or_ruby_files'
2021-01-24 01:59:31 -05:00
}
# brew bump
_brew_bump() {
_arguments \
'--debug[Display any debugging information]' \
2024-07-15 19:56:06 +00:00
'(--installed)--eval-all[Evaluate all formulae and casks]' \
2021-03-17 10:47:09 +00:00
'--full-name[Print formulae/casks with fully-qualified names]' \
2021-01-24 01:59:31 -05:00
'--help[Show this message]' \
2024-09-06 12:17:31 +00:00
'(--tap --eval-all --auto)--installed[Check formulae and casks that are currently installed]' \
2024-02-23 12:25:05 -08:00
'--no-fork[Don'\''t try to fork the repository]' \
2022-01-13 10:37:41 +00:00
'(--open-pr)--no-pull-requests[Do not retrieve pull requests from GitHub]' \
2023-01-23 13:36:54 +00:00
'(--no-pull-requests)--open-pr[Open a pull request for the new version if none have been opened yet]' \
2021-01-24 01:59:31 -05:00
'--quiet[Make some output more quiet]' \
2024-07-14 20:49:39 +00:00
'--repology[Use Repology to check for outdated packages]' \
2021-09-24 22:44:27 -04:00
'--start-with[Letter or word that the list of package results should alphabetically follow]' \
2024-03-06 15:21:01 +00:00
'(--installed)--tap[Check formulae and casks within the given tap, specified as user`/`repo]' \
2021-01-24 01:59:31 -05:00
'--verbose[Make some output more verbose]' \
2021-03-14 01:39:33 +05:30
- formula \
'(--cask)--formula[Check only formulae]' \
'*::formula:__brew_formulae' \
- cask \
'(--formula)--cask[Check only casks]' \
'*::cask:__brew_casks'
2016-09-12 05:28:14 -05:00
}
2021-01-24 01:59:31 -05:00
# brew bump-cask-pr
_brew_bump_cask_pr() {
_arguments \
2021-11-22 12:28:54 +00:00
'--commit[When passed with `--write-only`, generate a new commit after writing changes to the cask file]' \
2021-01-24 01:59:31 -05:00
'--debug[Display any debugging information]' \
2021-01-27 13:45:11 +11:00
'(--write)--dry-run[Print what would be done rather than doing it]' \
2021-04-19 09:23:24 +00:00
'--fork-org[Use the specified GitHub organization for forking]' \
2021-01-24 01:59:31 -05:00
'--help[Show this message]' \
2022-11-21 14:31:02 +00:00
'--message[Prepend message to the default pull request message]' \
2021-01-27 13:45:11 +11:00
'(--online)--no-audit[Don'\''t run `brew audit` before opening the PR]' \
2021-01-24 01:59:31 -05:00
'--no-browse[Print the pull request URL instead of opening in a browser]' \
'--no-fork[Don'\''t try to fork the repository]' \
'--no-style[Don'\''t run `brew style --fix` before opening the PR]' \
'--quiet[Make some output more quiet]' \
'--sha256[Specify the SHA-256 checksum of the new download]' \
'--url[Specify the URL for the new download]' \
'--verbose[Make some output more verbose]' \
2023-07-21 11:45:34 -04:00
'(--version-arm --version-intel)--version[Specify the new version for the cask]' \
'(--version)--version-arm[Specify the new cask version for the ARM architecture]' \
'(--version)--version-intel[Specify the new cask version for the Intel architecture]' \
2021-10-20 12:08:26 +00:00
'--write-only[Make the expected file modifications without taking any Git actions]' \
2021-03-14 01:39:33 +05:30
- cask \
'*::cask:__brew_casks'
2021-01-24 01:59:31 -05:00
}
# brew bump-formula-pr
_brew_bump_formula_pr() {
_arguments \
2021-10-13 00:06:32 +00:00
'--commit[When passed with `--write-only`, generate a new commit after writing changes to the formula file]' \
2021-01-24 01:59:31 -05:00
'--debug[Display any debugging information]' \
2022-08-23 10:52:39 +00:00
'(--write-only)--dry-run[Print what would be done rather than doing it]' \
2024-02-15 16:56:30 +00:00
'--force[Remove all mirrors if `--mirror` was not specified]' \
2021-04-17 12:21:10 +00:00
'--fork-org[Use the specified GitHub organization for forking]' \
2021-01-24 01:59:31 -05:00
'--help[Show this message]' \
2024-02-29 15:14:06 -05:00
'--install-dependencies[Install missing dependencies required to update resources]' \
2022-11-21 14:31:02 +00:00
'--message[Prepend message to the default pull request message]' \
2021-01-24 01:59:31 -05:00
'--mirror[Use the specified URL as a mirror URL. If URL is a comma-separated list of URLs, multiple mirrors will be added]' \
2021-01-27 13:45:11 +11:00
'(--strict --online)--no-audit[Don'\''t run `brew audit` before opening the PR]' \
2021-01-24 01:59:31 -05:00
'--no-browse[Print the pull request URL instead of opening in a browser]' \
'--no-fork[Don'\''t try to fork the repository]' \
2021-01-27 13:45:11 +11:00
'(--no-audit)--online[Run `brew audit --online` before opening the PR]' \
2022-04-22 13:24:57 +00:00
'--python-exclude-packages[Exclude these Python packages when finding resources]' \
'--python-extra-packages[Include these additional Python packages when finding resources]' \
'--python-package-name[Use the specified package-name when finding Python resources for formula. If no package name is specified, it will be inferred from the formula'\''s stable URL]' \
2021-01-24 01:59:31 -05:00
'--quiet[Make some output more quiet]' \
'--revision[Specify the new commit revision corresponding to the specified git tag or specified version]' \
'--sha256[Specify the SHA-256 checksum of the new download]' \
2021-01-27 13:45:11 +11:00
'(--no-audit)--strict[Run `brew audit --strict` before opening the PR]' \
'(--url)--tag[Specify the new git commit tag for the formula]' \
'(--tag)--url[Specify the URL for the new download. If a URL is specified, the SHA-256 checksum of the new download should also be specified]' \
2021-01-24 01:59:31 -05:00
'--verbose[Make some output more verbose]' \
'--version[Use the specified version to override the value parsed from the URL or tag. Note that `--version=0` can be used to delete an existing version override from a formula if it has become redundant]' \
2021-10-13 00:06:32 +00:00
'(--dry-run)--write-only[Make the expected file modifications without taking any Git actions]' \
2021-03-14 01:39:33 +05:30
- formula \
'*::formula:__brew_formulae'
2021-01-24 01:59:31 -05:00
}
# brew bump-revision
2019-10-27 02:30:14 -07:00
_brew_bump_revision() {
_arguments \
2021-01-24 01:59:31 -05:00
'--debug[Display any debugging information]' \
2021-09-14 10:01:10 +00:00
'(--write-only)--dry-run[Print what would be done rather than doing it]' \
2021-01-24 01:59:31 -05:00
'--help[Show this message]' \
'--message[Append message to the default commit message]' \
'--quiet[Make some output more quiet]' \
2021-12-29 13:34:43 +00:00
'--remove-bottle-block[Remove the bottle block in addition to bumping the revision]' \
2021-01-24 01:59:31 -05:00
'--verbose[Make some output more verbose]' \
2021-09-14 10:01:10 +00:00
'(--dry-run)--write-only[Make the expected file modifications without taking any Git actions]' \
2021-03-14 01:39:33 +05:30
- formula \
'*::formula:__brew_formulae'
2019-10-27 02:30:14 -07:00
}
2021-01-24 01:59:31 -05:00
# brew bump-unversioned-casks
_brew_bump_unversioned_casks() {
_arguments \
'--debug[Display any debugging information]' \
'--dry-run[Do everything except caching state and opening pull requests]' \
'--help[Show this message]' \
'--limit[Maximum runtime in minutes]' \
'--quiet[Make some output more quiet]' \
'--state-file[File for caching state]' \
'--verbose[Make some output more verbose]' \
2021-03-14 01:39:33 +05:30
- cask \
'*::cask:__brew_casks' \
- tap \
'*::tap:__brew_any_tap'
2021-01-24 01:59:31 -05:00
}
2025-03-19 07:11:41 +00:00
# brew bundle
_brew_bundle() {
_arguments \
'(--no-vscode)--all[`list` all dependencies]' \
'--cask[`list` or `dump` Homebrew cask dependencies]' \
'--cleanup[`install` performs cleanup operation, same as running `cleanup --force`. This is enabled by default if `$HOMEBREW_BUNDLE_INSTALL_CLEANUP` is set and `--global` is passed]' \
'--debug[Display any debugging information]' \
'--describe[`dump` adds a description comment above each line, unless the dependency does not have a description. This is enabled by default if `$HOMEBREW_BUNDLE_DUMP_DESCRIBE` is set]' \
'--file[Read from or write to the `Brewfile` from this location. Use `--file=-` to pipe to stdin/stdout]' \
'--force[`install` runs with `--force`/`--overwrite`. `dump` overwrites an existing `Brewfile`. `cleanup` actually performs its cleanup operations]' \
'--formula[`list` or `dump` Homebrew formula dependencies]' \
'--global[Read from or write to the `Brewfile` from `$HOMEBREW_BUNDLE_FILE_GLOBAL` (if set), `${XDG_CONFIG_HOME}/homebrew/Brewfile` (if `$XDG_CONFIG_HOME` is set), `~/.homebrew/Brewfile` or `~/.Brewfile` otherwise]' \
'--help[Show this message]' \
'(--upgrade)--install[Run `install` before continuing to other operations e.g. `exec`]' \
'--mas[`list` or `dump` Mac App Store dependencies]' \
'--no-restart[`dump` does not add `restart_service` to formula lines]' \
'--no-upgrade[`install` does not run `brew upgrade` on outdated dependencies. `check` does not check for outdated dependencies. Note they may still be upgraded by `brew install` if needed. This is enabled by default if `$HOMEBREW_BUNDLE_NO_UPGRADE` is set]' \
'(--all --vscode)--no-vscode[`dump` without VSCode extensions. This is enabled by default if `$HOMEBREW_BUNDLE_DUMP_NO_VSCODE` is set]' \
'--quiet[Make some output more quiet]' \
'--tap[`list` or `dump` Homebrew tap dependencies]' \
'(--install)--upgrade[`install` runs `brew upgrade` on outdated dependencies, even if `$HOMEBREW_BUNDLE_NO_UPGRADE` is set. ]' \
'--verbose[`install` prints output from commands as they are run. `check` lists all missing dependencies]' \
'(--no-vscode)--vscode[`list` or `dump` VSCode extensions]' \
'--whalebrew[`list` or `dump` Whalebrew dependencies]' \
'--zap[`cleanup` casks using the `zap` command instead of `uninstall`]' \
- subcommand \
'*::subcommand:(install dump cleanup check exec list sh env edit)'
}
2024-07-14 16:18:26 -04:00
# brew casks
_brew_casks() {
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]'
}
2021-01-24 01:59:31 -05:00
# brew cat
2016-09-12 05:28:14 -05:00
_brew_cat() {
_arguments \
2021-01-24 01:59:31 -05:00
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]' \
2021-03-14 01:39:33 +05:30
- formula \
'(--cask)--formula[Treat all named arguments as formulae]' \
'*::formula:__brew_formulae' \
- cask \
'(--formula)--cask[Treat all named arguments as casks]' \
'*::cask:__brew_casks'
2016-09-12 05:28:14 -05:00
}
2021-01-24 01:59:31 -05:00
# brew cleanup
2016-09-12 05:28:14 -05:00
_brew_cleanup() {
_arguments \
2021-01-24 01:59:31 -05:00
'--debug[Display any debugging information]' \
'--dry-run[Show what would be removed, but do not actually remove anything]' \
'--help[Show this message]' \
'--prune[Remove all cache files older than specified days. If you want to remove everything, use `--prune=all`]' \
'--prune-prefix[Only prune the symlinks and directories from the prefix and remove no other files]' \
'--quiet[Make some output more quiet]' \
2024-06-03 11:52:13 +00:00
'--scrub[Scrub the cache, including downloads for even the latest versions. Note that downloads for any installed formulae or casks will still not be deleted. If you want to delete those too: `rm -rf "$(brew --cache)"`]' \
2021-01-24 01:59:31 -05:00
'--verbose[Make some output more verbose]' \
2021-03-14 01:39:33 +05:30
- formula \
'*::formula:__brew_formulae' \
- cask \
'*::cask:__brew_casks'
2021-01-24 01:59:31 -05:00
}
# brew command
2016-09-12 05:28:14 -05:00
_brew_command() {
_arguments \
2021-01-24 01:59:31 -05:00
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]' \
2021-03-14 01:39:33 +05:30
- command \
'*::command:__brew_commands'
2016-09-12 05:28:14 -05:00
}
2021-01-24 01:59:31 -05:00
# brew commands
2016-09-12 05:28:14 -05:00
_brew_commands() {
2021-01-24 01:59:31 -05:00
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--include-aliases[Include aliases of internal commands]' \
'--quiet[List only the names of commands without category headers]' \
'--verbose[Make some output more verbose]'
}
# brew completions
_brew_completions() {
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]' \
2021-03-14 01:39:33 +05:30
- subcommand \
'*::subcommand:(state link unlink)'
2016-09-12 05:28:14 -05:00
}
# brew config
_brew_config() {
2021-01-24 01:59:31 -05:00
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]'
2016-09-12 05:28:14 -05:00
}
2022-08-03 18:07:13 +00:00
# brew contributions
_brew_contributions() {
_arguments \
2023-02-25 17:52:54 +00:00
'--csv[Print a CSV of contributions across repositories over the time period]' \
2022-08-03 18:07:13 +00:00
'--debug[Display any debugging information]' \
2023-08-30 15:08:50 +01:00
'--from[Date (ISO-8601 format) to start searching contributions. Omitting this flag searches the last year]' \
2022-08-03 18:07:13 +00:00
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
2025-03-19 07:11:41 +00:00
'--repositories[Specify a comma-separated list of repositories to search. Supported repositories: `brew`, `core`, `cask`, `command-not-found` and `test-bot`. Omitting this flag, or specifying `--repositories=primary`, searches only the main repositories: brew,core,cask. Specifying `--repositories=all`, searches all repositories. ]' \
2022-08-03 18:07:13 +00:00
'--to[Date (ISO-8601 format) to stop searching contributions]' \
2023-08-30 15:08:50 +01:00
'--user[Specify a comma-separated list of GitHub usernames or email addresses to find contributions from. Omitting this flag searches maintainers]' \
2022-08-03 18:07:13 +00:00
'--verbose[Make some output more verbose]'
}
2021-01-24 01:59:31 -05:00
# brew create
_brew_create() {
_arguments \
2021-01-27 13:45:11 +11:00
'(--cask)--HEAD[Indicate that URL points to the package'\''s repository rather than a file]' \
2025-02-21 19:40:15 +00:00
'(--cmake --crystal --go --meson --node --perl --python --ruby --rust --zig --cask)--autotools[Create a basic template for an Autotools-style build]' \
'(--autotools --cmake --crystal --go --meson --node --perl --python --ruby --rust --zig --HEAD --set-license)--cask[Create a basic template for a cask]' \
'(--autotools --crystal --go --meson --node --perl --python --ruby --rust --zig --cask)--cmake[Create a basic template for a CMake-style build]' \
'(--autotools --cmake --go --meson --node --perl --python --ruby --rust --zig --cask)--crystal[Create a basic template for a Crystal build]' \
2021-01-24 01:59:31 -05:00
'--debug[Display any debugging information]' \
'--force[Ignore errors for disallowed formula names and names that shadow aliases]' \
2025-02-21 19:40:15 +00:00
'(--autotools --cmake --crystal --meson --node --perl --python --ruby --rust --zig --cask)--go[Create a basic template for a Go build]' \
2021-01-24 01:59:31 -05:00
'--help[Show this message]' \
2025-02-21 19:40:15 +00:00
'(--autotools --cmake --crystal --go --node --perl --python --ruby --rust --zig --cask)--meson[Create a basic template for a Meson-style build]' \
2021-01-24 01:59:31 -05:00
'--no-fetch[Homebrew will not download URL to the cache and will thus not add its SHA-256 to the formula for you, nor will it check the GitHub API for GitHub projects (to fill out its description and homepage)]' \
2025-02-21 19:40:15 +00:00
'(--autotools --cmake --crystal --go --meson --perl --python --ruby --rust --zig --cask)--node[Create a basic template for a Node build]' \
'(--autotools --cmake --crystal --go --meson --node --python --ruby --rust --zig --cask)--perl[Create a basic template for a Perl build]' \
'(--autotools --cmake --crystal --go --meson --node --perl --ruby --rust --zig --cask)--python[Create a basic template for a Python build]' \
2021-01-24 01:59:31 -05:00
'--quiet[Make some output more quiet]' \
2025-02-21 19:40:15 +00:00
'(--autotools --cmake --crystal --go --meson --node --perl --python --rust --zig --cask)--ruby[Create a basic template for a Ruby build]' \
'(--autotools --cmake --crystal --go --meson --node --perl --python --ruby --zig --cask)--rust[Create a basic template for a Rust build]' \
2021-01-27 13:45:11 +11:00
'(--cask)--set-license[Explicitly set the license of the new formula]' \
2021-01-24 01:59:31 -05:00
'--set-name[Explicitly set the name of the new formula or cask]' \
'--set-version[Explicitly set the version of the new formula or cask]' \
'--tap[Generate the new formula within the given tap, specified as user`/`repo]' \
2025-02-21 19:40:15 +00:00
'--verbose[Make some output more verbose]' \
'(--autotools --cmake --crystal --go --meson --node --perl --python --ruby --rust --cask)--zig[Create a basic template for a Zig build]'
2021-01-24 01:59:31 -05:00
}
2024-08-15 14:29:45 +00:00
# brew debugger
_brew_debugger() {
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--open[Start remote debugging over a Unix socket]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]' \
- command \
'*::command:__brew_commands'
}
2021-01-24 01:59:31 -05:00
# brew deps
2016-09-12 05:28:14 -05:00
_brew_deps() {
_arguments \
2023-10-12 07:58:25 -04:00
'--HEAD[Show dependencies for HEAD version instead of stable version]' \
'--annotate[Mark any build, test, implicit, optional, or recommended dependencies as such in the output]' \
2024-04-22 12:38:11 +00:00
'--arch[Show dependencies for the given CPU architecture]' \
2021-01-24 01:59:31 -05:00
'--debug[Display any debugging information]' \
2022-08-31 17:21:44 +01:00
'--direct[Show only the direct dependencies declared in the formula]' \
2021-11-17 10:51:48 +00:00
'--dot[Show text-based graph description in DOT format]' \
2022-09-05 13:57:22 +01:00
'(--installed)--eval-all[Evaluate all available formulae and casks, whether installed or not, to list their dependencies]' \
2023-10-12 07:58:25 -04:00
'--for-each[Switch into the mode used by the `--eval-all` option, but only list dependencies for each provided formula, one formula per line. This is used for debugging the `--installed`/`--eval-all` display mode]' \
2021-01-24 01:59:31 -05:00
'--full-name[List dependencies by their full name]' \
2021-11-17 10:51:48 +00:00
'(--tree)--graph[Show dependencies as a directed graph]' \
2021-01-24 01:59:31 -05:00
'--help[Show this message]' \
'--include-build[Include `:build` dependencies for formula]' \
2024-12-30 16:14:33 +00:00
'--include-implicit[Include implicit dependencies used to download and unpack source files]' \
2021-01-24 01:59:31 -05:00
'--include-optional[Include `:optional` dependencies for formula]' \
'--include-requirements[Include requirements in addition to dependencies for formula]' \
'--include-test[Include `:test` dependencies for formula (non-recursive)]' \
2023-10-12 07:58:25 -04:00
'(--missing --eval-all)--installed[List dependencies for formulae that are currently installed. If formula is specified, list only its dependencies that are currently installed]' \
2023-05-18 14:09:30 +00:00
'(--installed)--missing[Show only missing dependencies]' \
2024-04-22 12:38:11 +00:00
'--os[Show dependencies for the given operating system]' \
2021-01-24 01:59:31 -05:00
'--quiet[Make some output more quiet]' \
'--skip-recommended[Skip `:recommended` dependencies for formula]' \
2022-08-31 17:21:44 +01:00
'--topological[Sort dependencies in topological order]' \
2021-11-17 10:51:48 +00:00
'(--graph)--tree[Show dependencies as a tree. When given multiple formula arguments, show individual trees for each formula]' \
2021-01-24 01:59:31 -05:00
'--union[Show the union of dependencies for multiple formula, instead of the intersection]' \
'--verbose[Make some output more verbose]' \
2021-03-14 01:39:33 +05:30
- formula \
'(--cask)--formula[Treat all named arguments as formulae]' \
'*::formula:__brew_formulae' \
- cask \
'(--formula)--cask[Treat all named arguments as casks]' \
'*::cask:__brew_casks'
2021-01-24 01:59:31 -05:00
}
# brew desc
2016-09-12 05:28:14 -05:00
_brew_desc() {
_arguments \
2021-01-24 01:59:31 -05:00
'--debug[Display any debugging information]' \
2021-01-27 13:45:11 +11:00
'(--search --name)--description[Search just descriptions for text. If text is flanked by slashes, it is interpreted as a regular expression]' \
2025-01-27 14:21:27 +00:00
'--eval-all[Evaluate all available formulae and casks, whether installed or not, to search their descriptions. Implied if `$HOMEBREW_EVAL_ALL` is set]' \
2021-01-24 01:59:31 -05:00
'--help[Show this message]' \
2021-01-27 13:45:11 +11:00
'(--search --description)--name[Search just names for text. If text is flanked by slashes, it is interpreted as a regular expression]' \
2021-01-24 01:59:31 -05:00
'--quiet[Make some output more quiet]' \
2021-01-27 13:45:11 +11:00
'(--name --description)--search[Search both names and descriptions for text. If text is flanked by slashes, it is interpreted as a regular expression]' \
2021-01-24 01:59:31 -05:00
'--verbose[Make some output more verbose]' \
2021-03-14 01:39:33 +05:30
- formula \
2022-03-23 00:03:11 -04:00
'--formula[Treat all named arguments as formulae]' \
'*::formula:__brew_formulae' \
- cask \
'--cask[Treat all named arguments as casks]' \
'*::cask:__brew_casks'
2021-01-24 01:59:31 -05:00
}
2023-04-03 12:43:09 +00:00
# brew determine-test-runners
_brew_determine_test_runners() {
_arguments \
2023-11-17 11:42:12 +00:00
'(--dependents)--all-supported[Instead of selecting runners based on the chosen formula, return all supported runners]' \
2023-04-03 12:43:09 +00:00
'--debug[Display any debugging information]' \
2023-11-17 11:42:12 +00:00
'(--all-supported)--dependents[Determine runners for testing dependents. Requires `--eval-all` or `HOMEBREW_EVAL_ALL`]' \
2023-04-05 01:11:14 +08:00
'--eval-all[Evaluate all available formulae, whether installed or not, to determine testing dependents]' \
2023-04-03 12:43:09 +00:00
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]'
}
2021-07-14 01:09:03 -04:00
# brew developer
_brew_developer() {
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]' \
- subcommand \
'*::subcommand:(state on off)'
}
2021-01-24 01:59:31 -05:00
# brew dispatch-build-bottle
_brew_dispatch_build_bottle() {
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--issue[If specified, post a comment to this issue number if the job fails]' \
2022-06-14 00:48:25 +01:00
'(--linux-self-hosted)--linux[Dispatch bottle for Linux (using GitHub runners)]' \
'(--linux)--linux-self-hosted[Dispatch bottle for Linux (using self-hosted runner)]' \
2021-07-06 12:37:34 +00:00
'--linux-wheezy[Use Debian Wheezy container for building the bottle on Linux]' \
2023-02-10 23:15:40 -05:00
'--macos[macOS version (or comma-separated list of versions) the bottle should be built for]' \
2021-01-24 01:59:31 -05:00
'--quiet[Make some output more quiet]' \
'--tap[Target tap repository (default: `homebrew/core`)]' \
2021-10-22 16:30:31 +01:00
'--timeout[Build timeout (in minutes, default: 60)]' \
2021-05-12 13:37:18 +01:00
'--upload[Upload built bottles]' \
2021-01-24 01:59:31 -05:00
'--verbose[Make some output more verbose]' \
'--workflow[Dispatch specified workflow (default: `dispatch-build-bottle.yml`)]' \
2021-03-14 01:39:33 +05:30
- formula \
'*::formula:__brew_formulae'
2021-01-24 01:59:31 -05:00
}
2022-09-12 13:56:29 +00:00
# brew docs
_brew_docs() {
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]'
}
2016-09-12 05:28:14 -05:00
# brew doctor
_brew_doctor() {
2021-01-24 01:59:31 -05:00
_arguments \
'--audit-debug[Enable debugging and profiling of audit methods]' \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--list-checks[List all audit methods, which can be run individually if provided as arguments]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]' \
2021-03-14 01:39:33 +05:30
- diagnostic_check \
'*::diagnostic_check:__brew_diagnostic_checks'
2021-01-24 01:59:31 -05:00
}
# brew dr
_brew_dr() {
_arguments \
'--audit-debug[Enable debugging and profiling of audit methods]' \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--list-checks[List all audit methods, which can be run individually if provided as arguments]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]' \
2021-03-14 01:39:33 +05:30
- diagnostic_check \
'*::diagnostic_check:__brew_diagnostic_checks'
2016-09-12 05:28:14 -05:00
}
# brew edit
_brew_edit() {
_arguments \
2021-01-24 01:59:31 -05:00
'--debug[Display any debugging information]' \
'--help[Show this message]' \
2021-10-20 08:27:58 +00:00
'--print-path[Print the file path to be edited, without opening an editor]' \
2021-01-24 01:59:31 -05:00
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]' \
2021-03-14 01:39:33 +05:30
- formula \
'(--cask)--formula[Treat all named arguments as formulae]' \
'*::formula:__brew_formulae' \
- cask \
'(--formula)--cask[Treat all named arguments as casks]' \
2023-07-31 20:26:29 -04:00
'*::cask:__brew_casks' \
- tap \
'*::tap:__brew_any_tap'
2021-01-24 01:59:31 -05:00
}
# brew environment
_brew_environment() {
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--plain[Generate plain output even when piped]' \
'--quiet[Make some output more quiet]' \
'--shell[Generate a list of environment variables for the specified shell, or `--shell=auto` to detect the current shell]' \
'--verbose[Make some output more verbose]' \
2021-03-14 01:39:33 +05:30
- formula \
'*::formula:__brew_formulae'
2016-09-12 05:28:14 -05:00
}
2021-01-24 01:59:31 -05:00
# brew extract
_brew_extract() {
2016-09-12 05:28:14 -05:00
_arguments \
2021-01-24 01:59:31 -05:00
'--debug[Display any debugging information]' \
'--force[Overwrite the destination formula if it already exists]' \
2024-06-30 18:38:19 +00:00
'--git-revision[Search for the specified version of formula starting at revision instead of HEAD]' \
2021-01-24 01:59:31 -05:00
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]' \
'--version[Extract the specified version of formula instead of the most recent]' \
2021-03-14 01:39:33 +05:30
- formula \
'*::formula:__brew_formulae' \
- tap \
'*::tap:__brew_any_tap'
2016-09-12 05:28:14 -05:00
}
2021-01-24 01:59:31 -05:00
# brew fetch
_brew_fetch() {
_arguments \
2021-01-27 13:45:11 +11:00
'(--cask)--HEAD[Fetch HEAD version instead of stable version]' \
2023-10-12 07:58:25 -04:00
'(--bottle-tag)--arch[Download for the given CPU architecture. (Pass `all` to download for all architectures.)]' \
2023-05-19 13:04:26 +00:00
'(--build-from-source --build-bottle --force-bottle --cask --os --arch)--bottle-tag[Download a bottle for given tag]' \
2021-07-13 16:54:15 +00:00
'(--build-from-source --force-bottle --bottle-tag --cask)--build-bottle[Download source packages (for eventual bottling) rather than a bottle]' \
'(--build-bottle --force-bottle --bottle-tag)--build-from-source[Download source packages rather than a bottle]' \
2021-01-24 01:59:31 -05:00
'--debug[Display any debugging information]' \
2021-01-27 13:45:11 +11:00
'(--cask)--deps[Also download dependencies for any listed formula]' \
2021-01-24 01:59:31 -05:00
'--force[Remove a previously cached version and re-fetch]' \
2021-07-13 16:54:15 +00:00
'(--build-from-source --build-bottle --bottle-tag --cask)--force-bottle[Download a bottle if it exists for the current or newest version of macOS, even if it would not be used during installation]' \
2021-01-24 01:59:31 -05:00
'--help[Show this message]' \
'--no-quarantine[Disable/enable quarantining of downloads (default: enabled)]' \
2023-10-12 07:58:25 -04:00
'(--bottle-tag)--os[Download for the given operating system. (Pass `all` to download for all operating systems.)]' \
2021-01-24 01:59:31 -05:00
'--quarantine[Disable/enable quarantining of downloads (default: enabled)]' \
'--quiet[Make some output more quiet]' \
2022-09-06 10:11:21 +00:00
'--retry[Retry if downloading fails or re-download if the checksum of a previously cached version no longer matches. Tries at most 5 times with exponential backoff]' \
2021-01-24 01:59:31 -05:00
'--verbose[Do a verbose VCS checkout, if the URL represents a VCS. This is useful for seeing if an existing VCS cache has been updated]' \
2021-03-14 01:39:33 +05:30
- formula \
'(--cask)--formula[Treat all named arguments as formulae]' \
'*::formula:__brew_formulae' \
- cask \
2024-09-26 20:23:08 -04:00
'(--HEAD --deps -s --build-bottle --force-bottle --bottle-tag --formula)--cask[Treat all named arguments as casks]' \
2021-03-14 01:39:33 +05:30
'*::cask:__brew_casks'
2021-01-24 01:59:31 -05:00
}
# brew formula
2017-02-11 16:37:41 -08:00
_brew_formula() {
2021-01-24 01:59:31 -05:00
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]' \
2021-03-14 01:39:33 +05:30
- formula \
'*::formula:__brew_formulae'
2017-02-11 16:37:41 -08:00
}
2025-02-09 00:11:25 +00:00
# brew formula-analytics
_brew_formula_analytics() {
_arguments \
'(--json --setup)--all-core-formulae-json[Output a different JSON format containing the JSON data for all Homebrew/homebrew-core formulae]' \
'(--install --cask-install --install-on-request --build-error --os-version --homebrew-devcmdrun-developer --homebrew-os-arch-ci --homebrew-prefixes --homebrew-versions --brew-command-run-options --brew-test-bot-test)--brew-command-run[Output `brew` commands run]' \
'(--install --cask-install --install-on-request --build-error --os-version --homebrew-devcmdrun-developer --homebrew-os-arch-ci --homebrew-prefixes --homebrew-versions --brew-command-run --brew-test-bot-test)--brew-command-run-options[Output `brew` commands run with options]' \
'(--install --cask-install --install-on-request --build-error --os-version --homebrew-devcmdrun-developer --homebrew-os-arch-ci --homebrew-prefixes --homebrew-versions --brew-command-run --brew-command-run-options)--brew-test-bot-test[Output `brew test-bot` steps run]' \
'(--install --cask-install --install-on-request --os-version --homebrew-devcmdrun-developer --homebrew-os-arch-ci --homebrew-prefixes --homebrew-versions --brew-command-run --brew-command-run-options --brew-test-bot-test)--build-error[Output the number of build errors for the formulae]' \
'(--install --install-on-request --build-error --os-version --homebrew-devcmdrun-developer --homebrew-os-arch-ci --homebrew-prefixes --homebrew-versions --brew-command-run --brew-command-run-options --brew-test-bot-test)--cask-install[Output the number of installations of casks]' \
'--days-ago[Query from the specified days ago until the present. The default is 30 days]' \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'(--install --cask-install --install-on-request --build-error --os-version --homebrew-os-arch-ci --homebrew-prefixes --homebrew-versions --brew-command-run --brew-command-run-options --brew-test-bot-test)--homebrew-devcmdrun-developer[Output devcmdrun/HOMEBREW_DEVELOPER]' \
'(--install --cask-install --install-on-request --build-error --os-version --homebrew-devcmdrun-developer --homebrew-prefixes --homebrew-versions --brew-command-run --brew-command-run-options --brew-test-bot-test)--homebrew-os-arch-ci[Output OS/Architecture/CI]' \
'(--install --cask-install --install-on-request --build-error --os-version --homebrew-devcmdrun-developer --homebrew-os-arch-ci --homebrew-versions --brew-command-run --brew-command-run-options --brew-test-bot-test)--homebrew-prefixes[Output Homebrew prefixes]' \
'(--install --cask-install --install-on-request --build-error --os-version --homebrew-devcmdrun-developer --homebrew-os-arch-ci --homebrew-prefixes --brew-command-run --brew-command-run-options --brew-test-bot-test)--homebrew-versions[Output Homebrew versions]' \
'(--cask-install --install-on-request --build-error --os-version --homebrew-devcmdrun-developer --homebrew-os-arch-ci --homebrew-prefixes --homebrew-versions --brew-command-run --brew-command-run-options --brew-test-bot-test)--install[Output the number of specifically requested installations or installation as dependencies of the formula. This is the default]' \
'(--install --cask-install --build-error --os-version --homebrew-devcmdrun-developer --homebrew-os-arch-ci --homebrew-prefixes --homebrew-versions --brew-command-run --brew-command-run-options --brew-test-bot-test)--install-on-request[Output the number of specifically requested installations of the formula]' \
'(--all-core-formulae-json --setup)--json[Output JSON. This is required: plain text support has been removed]' \
'(--install --cask-install --install-on-request --build-error --homebrew-devcmdrun-developer --homebrew-os-arch-ci --homebrew-prefixes --homebrew-versions --brew-command-run --brew-command-run-options --brew-test-bot-test)--os-version[Output OS versions]' \
'--quiet[Make some output more quiet]' \
'(--json --all-core-formulae-json)--setup[Install the necessary gems, require them and exit without running a query]' \
'--verbose[Make some output more verbose]'
}
2024-07-14 16:18:26 -04:00
# brew formulae
_brew_formulae() {
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]'
}
2025-02-09 00:11:25 +00:00
# brew generate-analytics-api
_brew_generate_analytics_api() {
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]'
}
2023-02-23 09:03:06 +00:00
# brew generate-cask-api
_brew_generate_cask_api() {
_arguments \
'--debug[Display any debugging information]' \
2023-05-16 16:33:15 +00:00
'--dry-run[Generate API data without writing it to files]' \
2023-02-23 09:03:06 +00:00
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]'
}
2024-11-17 08:43:42 +00:00
# brew generate-cask-ci-matrix
_brew_generate_cask_ci_matrix() {
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'(--syntax-only)--new[Run new cask checks]' \
'--quiet[Make some output more quiet]' \
'(--syntax-only)--skip-install[Skip installing casks]' \
'(--skip-install --new)--syntax-only[Only run syntax checks]' \
'(--cask)--url[Treat named argument as a pull request URL]' \
'--verbose[Make some output more verbose]' \
- cask \
'(--url)--cask[Treat all named arguments as cask tokens]' \
'*::cask:__brew_casks'
}
2023-02-23 09:03:06 +00:00
# brew generate-formula-api
_brew_generate_formula_api() {
_arguments \
'--debug[Display any debugging information]' \
2023-05-16 16:33:15 +00:00
'--dry-run[Generate API data without writing it to files]' \
2023-02-23 09:03:06 +00:00
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]'
}
2021-05-04 18:33:22 +05:30
# brew generate-man-completions
_brew_generate_man_completions() {
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]'
}
2021-01-24 01:59:31 -05:00
# brew gist-logs
2016-09-12 05:28:14 -05:00
_brew_gist_logs() {
_arguments \
2021-01-24 01:59:31 -05:00
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--new-issue[Automatically create a new issue in the appropriate GitHub repository after creating the Gist]' \
'--private[The Gist will be marked private and will not appear in listings but will be accessible with its link]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]' \
'--with-hostname[Include the hostname in the Gist]' \
2021-03-14 01:39:33 +05:30
- formula \
'*::formula:__brew_formulae'
2016-09-12 05:28:14 -05:00
}
# brew home
_brew_home() {
2021-01-24 01:59:31 -05:00
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]' \
2021-03-14 01:39:33 +05:30
- formula \
'(--cask)--formula[Treat all named arguments as formulae]' \
'*::formula:__brew_formulae' \
- cask \
'(--formula)--cask[Treat all named arguments as casks]' \
'*::cask:__brew_casks'
2021-01-24 01:59:31 -05:00
}
# brew homepage
_brew_homepage() {
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]' \
2021-03-14 01:39:33 +05:30
- formula \
'(--cask)--formula[Treat all named arguments as formulae]' \
'*::formula:__brew_formulae' \
- cask \
'(--formula)--cask[Treat all named arguments as casks]' \
'*::cask:__brew_casks'
2016-09-12 05:28:14 -05:00
}
2021-01-24 01:59:31 -05:00
# brew info
2016-09-12 05:28:14 -05:00
_brew_info() {
_arguments \
2025-01-27 14:21:27 +00:00
'--analytics[List global Homebrew analytics data or, if specified, installation and build error data for formula (provided neither `$HOMEBREW_NO_ANALYTICS` nor `$HOMEBREW_NO_GITHUB_API` are set)]' \
2021-01-24 01:59:31 -05:00
'--category[Which type of analytics data to retrieve. The value for category must be `install`, `install-on-request` or `build-error`; `cask-install` or `os-version` may be specified if formula is not. The default is `install`]' \
'--days[How many days of analytics data to retrieve. The value for days must be `30`, `90` or `365`. The default is `30`]' \
'--debug[Display any debugging information]' \
2025-01-27 14:21:27 +00:00
'(--installed)--eval-all[Evaluate all available formulae and casks, whether installed or not, to print their JSON. Implied if `$HOMEBREW_EVAL_ALL` is set]' \
2024-08-26 16:59:37 -04:00
'(--cask --json)--fetch-manifest[Fetch GitHub Packages manifest for extra information when formula is not installed]' \
2023-02-10 12:07:36 -05:00
'--github[Open the GitHub source page for formula and cask in a browser. To view the history locally: `brew log -p` formula or cask]' \
2021-01-24 01:59:31 -05:00
'--help[Show this message]' \
2022-09-05 13:57:22 +01:00
'(--eval-all --all)--installed[Print JSON of formulae that are currently installed]' \
2024-08-26 16:59:37 -04:00
'(--fetch-manifest)--json[Print a JSON representation. Currently the default value for version is `v1` for formula. For formula and cask use `v2`. See the docs for examples of using the JSON output: https://docs.brew.sh/Querying-Brew]' \
2021-01-24 01:59:31 -05:00
'--quiet[Make some output more quiet]' \
2022-07-21 16:41:15 +02:00
'--variations[Include the variations hash in each formula'\''s JSON output]' \
2021-01-24 01:59:31 -05:00
'--verbose[Show more verbose analytics data for formula]' \
2021-03-14 01:39:33 +05:30
- formula \
'(--cask)--formula[Treat all named arguments as formulae]' \
'*::formula:__brew_formulae' \
- cask \
2024-08-26 16:59:37 -04:00
'(--formula --fetch-manifest)--cask[Treat all named arguments as casks]' \
2021-03-14 01:39:33 +05:30
'*::cask:__brew_casks'
2021-01-24 01:59:31 -05:00
}
# brew instal
_brew_instal() {
_arguments \
2021-07-08 07:36:17 +00:00
'(--cask)--HEAD[If formula defines it, install the HEAD version, aka. main, trunk, unstable, master]' \
2024-02-04 15:19:29 +01:00
'(--formula --force)--adopt[Adopt existing artifacts in the destination that are identical to those being installed. Cannot be combined with `--force`]' \
2021-01-27 13:45:11 +11:00
'(--formula)--appdir[Target location for Applications (default: `/Applications`)]' \
2025-03-11 10:09:23 +00:00
'(--cask)--ask[Ask for confirmation before downloading and installing formulae. Print bottles and dependencies download size and install size]' \
2025-01-27 15:12:50 +00:00
'(--formula)--audio-unit-plugindir[Target location for Audio Unit Plugins (default: `~/Library/Audio/Plug-Ins/Components`)]' \
2021-01-27 13:45:11 +11:00
'(--formula)--binaries[Disable/enable linking of helper executables (default: enabled)]' \
'(--cask)--bottle-arch[Optimise bottles for the specified architecture rather than the oldest architecture supported by the version of macOS the bottles are built on]' \
'(--cask --build-from-source --force-bottle)--build-bottle[Prepare the formula for eventual bottling during installation, skipping any post-install steps]' \
'(--cask --build-bottle --force-bottle)--build-from-source[Compile formula from source even if a bottle is provided. Dependencies will still be installed from bottles if they are available]' \
2024-08-22 17:42:46 -04:00
'(--cask)--cc[Attempt to compile using the specified compiler, which should be the name of the compiler'\''s executable, e.g. `gcc-9` for GCC 9. In order to use LLVM'\''s clang, specify `llvm_clang`. To use the Apple-provided clang, specify `clang`. This option will only accept compilers that are provided by Homebrew or bundled with macOS. Please do not file issues if you encounter errors while using this option]' \
2025-01-27 15:12:50 +00:00
'(--formula)--colorpickerdir[Target location for Color Pickers (default: `~/Library/ColorPickers`)]' \
2021-01-24 01:59:31 -05:00
'--debug[If brewing fails, open an interactive debugging session with access to IRB or a shell inside the temporary build directory]' \
2023-02-10 23:15:40 -05:00
'(--cask)--debug-symbols[Generate debug symbols on build. Source will be retained in a cache directory]' \
2025-01-27 15:12:50 +00:00
'(--formula)--dictionarydir[Target location for Dictionaries (default: `~/Library/Dictionaries`)]' \
2024-04-09 08:37:19 +00:00
'--display-times[Print install times for each package at the end of the run]' \
2022-10-03 09:41:20 +00:00
'--dry-run[Show what would be installed, but do not actually install anything]' \
2021-01-27 13:45:11 +11:00
'(--cask)--fetch-HEAD[Fetch the upstream repository to detect if the HEAD installation of the formula is outdated. Otherwise, the repository'\''s HEAD will only be checked for updates when a new stable or development version has been released]' \
2025-01-27 15:12:50 +00:00
'(--formula)--fontdir[Target location for Fonts (default: `~/Library/Fonts`)]' \
2022-10-26 11:17:55 +00:00
'(--adopt)--force[Install formulae without checking for previously installed keg-only or non-migrated versions. When installing casks, overwrite existing files (binaries and symlinks are excluded, unless originally from the same cask)]' \
2021-01-27 13:45:11 +11:00
'(--cask --build-from-source --build-bottle)--force-bottle[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]' \
'(--cask)--git[Create a Git repository, useful for creating patches to the software]' \
'--help[Show this message]' \
2023-09-09 12:09:38 -04:00
'(--cask --only-dependencies)--ignore-dependencies[An unsupported Homebrew development option to skip installing any dependencies of any kind. If the dependencies are not already present, the formula will have issues. If you'\''re not developing Homebrew, consider adjusting your PATH rather than using this option]' \
2021-01-27 13:45:11 +11:00
'(--cask)--include-test[Install testing dependencies required to run `brew test` formula]' \
2025-01-27 15:12:50 +00:00
'(--formula)--input-methoddir[Target location for Input Methods (default: `~/Library/Input Methods`)]' \
2021-01-27 13:45:11 +11:00
'(--cask)--interactive[Download and patch formula, then open a shell. This allows the user to run `./configure --help` and otherwise determine how to turn the software package into a Homebrew package]' \
2025-01-27 15:12:50 +00:00
'(--formula)--internet-plugindir[Target location for Internet Plugins (default: `~/Library/Internet Plug-Ins`)]' \
2021-01-27 13:45:11 +11:00
'(--cask)--keep-tmp[Retain the temporary files created during installation]' \
2023-03-27 13:56:29 +00:00
'(--formula)--keyboard-layoutdir[Target location for Keyboard Layouts (default: `/Library/Keyboard Layouts`)]' \
2021-01-27 13:45:11 +11:00
'(--formula)--language[Comma-separated list of language codes to prefer for cask installation. The first matching language is used, otherwise it reverts to the cask'\''s default language. The default value is the language of your system]' \
2025-01-27 15:12:50 +00:00
'(--formula)--mdimporterdir[Target location for Spotlight Plugins (default: `~/Library/Spotlight`)]' \
2021-01-24 01:59:31 -05:00
'--no-binaries[Disable/enable linking of helper executables (default: enabled)]' \
'--no-quarantine[Disable/enable quarantining of downloads (default: enabled)]' \
2021-01-27 13:45:11 +11:00
'(--cask --ignore-dependencies)--only-dependencies[Install the dependencies with specified options but do not install the formula itself]' \
2022-01-13 10:37:41 +00:00
'(--cask)--overwrite[Delete files that already exist in the prefix while linking]' \
2025-01-27 15:12:50 +00:00
'(--formula)--prefpanedir[Target location for Preference Panes (default: `~/Library/PreferencePanes`)]' \
'(--formula)--qlplugindir[Target location for Quick Look Plugins (default: `~/Library/QuickLook`)]' \
2021-01-27 13:45:11 +11:00
'(--formula)--quarantine[Disable/enable quarantining of downloads (default: enabled)]' \
'--quiet[Make some output more quiet]' \
'(--formula)--require-sha[Require all casks to have a checksum]' \
2025-01-27 15:12:50 +00:00
'(--formula)--screen-saverdir[Target location for Screen Savers (default: `~/Library/Screen Savers`)]' \
'(--formula)--servicedir[Target location for Services (default: `~/Library/Services`)]' \
2021-01-27 13:45:11 +11:00
'(--formula)--skip-cask-deps[Skip installing cask dependencies]' \
2025-01-23 14:42:03 +00:00
'(--cask)--skip-link[Install but skip linking the keg into the prefix]' \
2023-03-23 15:22:27 +00:00
'(--cask)--skip-post-install[Install but skip any post-install steps]' \
2023-09-09 12:09:38 -04:00
'--verbose[Print the verification and post-install steps]' \
2025-01-27 15:12:50 +00:00
'(--formula)--vst-plugindir[Target location for VST Plugins (default: `~/Library/Audio/Plug-Ins/VST`)]' \
'(--formula)--vst3-plugindir[Target location for VST3 Plugins (default: `~/Library/Audio/Plug-Ins/VST3`)]' \
2022-04-12 09:39:11 +00:00
'(--formula)--zap[For use with `brew reinstall --cask`. Remove all files associated with a cask. *May remove files which are shared between applications.*]' \
2021-03-14 01:39:33 +05:30
- formula \
2023-03-27 13:56:29 +00:00
'(--casks --binaries --require-sha --quarantine --adopt --skip-cask-deps --zap --appdir --keyboard-layoutdir --colorpickerdir --prefpanedir --qlplugindir --mdimporterdir --dictionarydir --fontdir --servicedir --input-methoddir --internet-plugindir --audio-unit-plugindir --vst-plugindir --vst3-plugindir --screen-saverdir --language)--formula[Treat all named arguments as formulae]' \
2021-03-14 01:39:33 +05:30
'*::formula:__brew_formulae' \
- cask \
2025-03-11 10:09:23 +00:00
'(--formulae --env --ignore-dependencies --only-dependencies --cc --build-from-source --force-bottle --include-test --HEAD --fetch-HEAD --keep-tmp --debug-symbols --build-bottle --skip-post-install --skip-link --bottle-arch --interactive --git --overwrite --ask)--cask[Treat all named arguments as casks]' \
2021-03-14 01:39:33 +05:30
'*::cask:__brew_casks'
2021-01-24 01:59:31 -05:00
}
# brew install
2016-09-12 05:28:14 -05:00
_brew_install() {
2021-01-24 01:59:31 -05:00
_arguments \
2021-07-08 07:36:17 +00:00
'(--cask)--HEAD[If formula defines it, install the HEAD version, aka. main, trunk, unstable, master]' \
2024-02-04 15:19:29 +01:00
'(--formula --force)--adopt[Adopt existing artifacts in the destination that are identical to those being installed. Cannot be combined with `--force`]' \
2021-01-27 13:45:11 +11:00
'(--formula)--appdir[Target location for Applications (default: `/Applications`)]' \
2025-03-11 10:09:23 +00:00
'(--cask)--ask[Ask for confirmation before downloading and installing formulae. Print bottles and dependencies download size and install size]' \
2025-01-27 15:12:50 +00:00
'(--formula)--audio-unit-plugindir[Target location for Audio Unit Plugins (default: `~/Library/Audio/Plug-Ins/Components`)]' \
2021-01-27 13:45:11 +11:00
'(--formula)--binaries[Disable/enable linking of helper executables (default: enabled)]' \
'(--cask)--bottle-arch[Optimise bottles for the specified architecture rather than the oldest architecture supported by the version of macOS the bottles are built on]' \
'(--cask --build-from-source --force-bottle)--build-bottle[Prepare the formula for eventual bottling during installation, skipping any post-install steps]' \
'(--cask --build-bottle --force-bottle)--build-from-source[Compile formula from source even if a bottle is provided. Dependencies will still be installed from bottles if they are available]' \
2024-08-22 17:42:46 -04:00
'(--cask)--cc[Attempt to compile using the specified compiler, which should be the name of the compiler'\''s executable, e.g. `gcc-9` for GCC 9. In order to use LLVM'\''s clang, specify `llvm_clang`. To use the Apple-provided clang, specify `clang`. This option will only accept compilers that are provided by Homebrew or bundled with macOS. Please do not file issues if you encounter errors while using this option]' \
2025-01-27 15:12:50 +00:00
'(--formula)--colorpickerdir[Target location for Color Pickers (default: `~/Library/ColorPickers`)]' \
2021-01-24 01:59:31 -05:00
'--debug[If brewing fails, open an interactive debugging session with access to IRB or a shell inside the temporary build directory]' \
2023-02-10 23:15:40 -05:00
'(--cask)--debug-symbols[Generate debug symbols on build. Source will be retained in a cache directory]' \
2025-01-27 15:12:50 +00:00
'(--formula)--dictionarydir[Target location for Dictionaries (default: `~/Library/Dictionaries`)]' \
2024-04-09 08:37:19 +00:00
'--display-times[Print install times for each package at the end of the run]' \
2022-10-03 09:41:20 +00:00
'--dry-run[Show what would be installed, but do not actually install anything]' \
2021-01-27 13:45:11 +11:00
'(--cask)--fetch-HEAD[Fetch the upstream repository to detect if the HEAD installation of the formula is outdated. Otherwise, the repository'\''s HEAD will only be checked for updates when a new stable or development version has been released]' \
2025-01-27 15:12:50 +00:00
'(--formula)--fontdir[Target location for Fonts (default: `~/Library/Fonts`)]' \
2022-10-26 11:17:55 +00:00
'(--adopt)--force[Install formulae without checking for previously installed keg-only or non-migrated versions. When installing casks, overwrite existing files (binaries and symlinks are excluded, unless originally from the same cask)]' \
2021-01-27 13:45:11 +11:00
'(--cask --build-from-source --build-bottle)--force-bottle[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]' \
'(--cask)--git[Create a Git repository, useful for creating patches to the software]' \
'--help[Show this message]' \
2023-09-09 12:09:38 -04:00
'(--cask --only-dependencies)--ignore-dependencies[An unsupported Homebrew development option to skip installing any dependencies of any kind. If the dependencies are not already present, the formula will have issues. If you'\''re not developing Homebrew, consider adjusting your PATH rather than using this option]' \
2021-01-27 13:45:11 +11:00
'(--cask)--include-test[Install testing dependencies required to run `brew test` formula]' \
2025-01-27 15:12:50 +00:00
'(--formula)--input-methoddir[Target location for Input Methods (default: `~/Library/Input Methods`)]' \
2021-01-27 13:45:11 +11:00
'(--cask)--interactive[Download and patch formula, then open a shell. This allows the user to run `./configure --help` and otherwise determine how to turn the software package into a Homebrew package]' \
2025-01-27 15:12:50 +00:00
'(--formula)--internet-plugindir[Target location for Internet Plugins (default: `~/Library/Internet Plug-Ins`)]' \
2021-01-27 13:45:11 +11:00
'(--cask)--keep-tmp[Retain the temporary files created during installation]' \
2023-03-27 13:56:29 +00:00
'(--formula)--keyboard-layoutdir[Target location for Keyboard Layouts (default: `/Library/Keyboard Layouts`)]' \
2021-01-27 13:45:11 +11:00
'(--formula)--language[Comma-separated list of language codes to prefer for cask installation. The first matching language is used, otherwise it reverts to the cask'\''s default language. The default value is the language of your system]' \
2025-01-27 15:12:50 +00:00
'(--formula)--mdimporterdir[Target location for Spotlight Plugins (default: `~/Library/Spotlight`)]' \
2021-01-24 01:59:31 -05:00
'--no-binaries[Disable/enable linking of helper executables (default: enabled)]' \
'--no-quarantine[Disable/enable quarantining of downloads (default: enabled)]' \
2021-01-27 13:45:11 +11:00
'(--cask --ignore-dependencies)--only-dependencies[Install the dependencies with specified options but do not install the formula itself]' \
2022-01-13 10:37:41 +00:00
'(--cask)--overwrite[Delete files that already exist in the prefix while linking]' \
2025-01-27 15:12:50 +00:00
'(--formula)--prefpanedir[Target location for Preference Panes (default: `~/Library/PreferencePanes`)]' \
'(--formula)--qlplugindir[Target location for Quick Look Plugins (default: `~/Library/QuickLook`)]' \
2021-01-27 13:45:11 +11:00
'(--formula)--quarantine[Disable/enable quarantining of downloads (default: enabled)]' \
'--quiet[Make some output more quiet]' \
'(--formula)--require-sha[Require all casks to have a checksum]' \
2025-01-27 15:12:50 +00:00
'(--formula)--screen-saverdir[Target location for Screen Savers (default: `~/Library/Screen Savers`)]' \
'(--formula)--servicedir[Target location for Services (default: `~/Library/Services`)]' \
2021-01-27 13:45:11 +11:00
'(--formula)--skip-cask-deps[Skip installing cask dependencies]' \
2025-01-23 14:42:03 +00:00
'(--cask)--skip-link[Install but skip linking the keg into the prefix]' \
2023-03-23 15:22:27 +00:00
'(--cask)--skip-post-install[Install but skip any post-install steps]' \
2023-09-09 12:09:38 -04:00
'--verbose[Print the verification and post-install steps]' \
2025-01-27 15:12:50 +00:00
'(--formula)--vst-plugindir[Target location for VST Plugins (default: `~/Library/Audio/Plug-Ins/VST`)]' \
'(--formula)--vst3-plugindir[Target location for VST3 Plugins (default: `~/Library/Audio/Plug-Ins/VST3`)]' \
2022-04-12 09:39:11 +00:00
'(--formula)--zap[For use with `brew reinstall --cask`. Remove all files associated with a cask. *May remove files which are shared between applications.*]' \
2021-03-14 01:39:33 +05:30
- formula \
2023-03-27 13:56:29 +00:00
'(--casks --binaries --require-sha --quarantine --adopt --skip-cask-deps --zap --appdir --keyboard-layoutdir --colorpickerdir --prefpanedir --qlplugindir --mdimporterdir --dictionarydir --fontdir --servicedir --input-methoddir --internet-plugindir --audio-unit-plugindir --vst-plugindir --vst3-plugindir --screen-saverdir --language)--formula[Treat all named arguments as formulae]' \
2021-03-14 01:39:33 +05:30
'*::formula:__brew_formulae' \
- cask \
2025-03-11 10:09:23 +00:00
'(--formulae --env --ignore-dependencies --only-dependencies --cc --build-from-source --force-bottle --include-test --HEAD --fetch-HEAD --keep-tmp --debug-symbols --build-bottle --skip-post-install --skip-link --bottle-arch --interactive --git --overwrite --ask)--cask[Treat all named arguments as casks]' \
2021-03-14 01:39:33 +05:30
'*::cask:__brew_casks'
2021-01-24 01:59:31 -05:00
}
# brew install-bundler-gems
_brew_install_bundler_gems() {
_arguments \
2023-09-04 21:48:26 +01:00
'(--groups)--add-groups[Installs the specified comma-separated list of gem groups, in addition to those already installed]' \
2021-01-24 01:59:31 -05:00
'--debug[Display any debugging information]' \
2023-09-04 21:48:26 +01:00
'(--add-groups)--groups[Installs the specified comma-separated list of gem groups (default: last used). Replaces any previously installed groups]' \
2021-01-24 01:59:31 -05:00
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]'
}
# brew irb
2016-09-12 05:28:14 -05:00
_brew_irb() {
2021-01-24 01:59:31 -05:00
_arguments \
'--debug[Display any debugging information]' \
'--examples[Show several examples]' \
'--help[Show this message]' \
'--pry[Use Pry instead of IRB. Implied if `HOMEBREW_PRY` is set]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]'
2016-09-12 05:28:14 -05:00
}
2021-07-14 22:00:01 +05:30
# brew lc
_brew_lc() {
_arguments \
2025-01-04 15:38:38 +00:00
'--autobump[Include packages that are autobumped by BrewTestBot. By default these are skipped]' \
2021-07-14 22:00:01 +05:30
'(--json)--debug[Display any debugging information]' \
2022-09-05 13:57:22 +01:00
'(--tap --installed)--eval-all[Evaluate all available formulae and casks, whether installed or not, to check them]' \
2024-04-08 13:35:25 +01:00
'(--formula)--extract-plist[Enable checking multiple casks with ExtractPlist strategy]' \
2022-09-05 13:57:22 +01:00
'--full-name[Print formulae and casks with fully-qualified names]' \
2021-07-14 22:00:01 +05:30
'--help[Show this message]' \
2022-09-05 13:57:22 +01:00
'(--tap --eval-all)--installed[Check formulae and casks that are currently installed]' \
2021-07-14 22:00:01 +05:30
'(--debug)--json[Output information in JSON format]' \
'--newer-only[Show the latest version only if it'\''s newer than the formula/cask]' \
'--quiet[Suppress warnings, don'\''t print a progress bar for JSON output]' \
2022-10-02 17:32:21 +00:00
'--resources[Also check resources for formulae]' \
2022-09-05 13:57:22 +01:00
'(--eval-all --installed)--tap[Check formulae and casks within the given tap, specified as user`/`repo]' \
2021-07-14 22:00:01 +05:30
'--verbose[Make some output more verbose]' \
- formula \
2024-03-21 11:47:37 +00:00
'(--cask --extract-plist)--formula[Only check formulae]' \
2021-07-14 22:00:01 +05:30
'*::formula:__brew_formulae' \
- cask \
'(--formula)--cask[Only check casks]' \
'*::cask:__brew_casks'
}
2016-09-12 05:28:14 -05:00
# brew leaves
_brew_leaves() {
2021-01-24 01:59:31 -05:00
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
2021-05-12 11:48:09 -04:00
'(--installed-on-request)--installed-as-dependency[Only list leaves that were installed as dependencies]' \
'(--installed-as-dependency)--installed-on-request[Only list leaves that were manually installed]' \
2021-01-24 01:59:31 -05:00
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]'
2016-09-12 05:28:14 -05:00
}
2021-01-24 01:59:31 -05:00
# brew link
2016-09-12 05:28:14 -05:00
_brew_link() {
_arguments \
2021-05-26 15:49:24 +00:00
'--HEAD[Link the HEAD version of the formula if it is installed]' \
2021-01-24 01:59:31 -05:00
'--debug[Display any debugging information]' \
'--dry-run[List files which would be linked or deleted by `brew link --overwrite` without actually linking or deleting any files]' \
'--force[Allow keg-only formulae to be linked]' \
'--help[Show this message]' \
'--overwrite[Delete files that already exist in the prefix while linking]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]' \
2021-03-14 01:39:33 +05:30
- installed_formula \
'*::installed_formula:__brew_installed_formulae'
2016-09-12 05:28:14 -05:00
}
2021-01-24 01:59:31 -05:00
# brew linkage
2016-09-12 05:28:14 -05:00
_brew_linkage() {
_arguments \
2021-01-24 01:59:31 -05:00
'--cached[Print the cached linkage values stored in `HOMEBREW_CACHE`, set by a previous `brew linkage` run]' \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--reverse[For every library that a keg references, print its dylib path followed by the binaries that link to it]' \
2021-11-22 12:28:54 +00:00
'--strict[Exit with a non-zero status if any undeclared dependencies with linkage are found]' \
2021-01-24 01:59:31 -05:00
'--test[Show only missing libraries and exit with a non-zero status if any missing libraries are found]' \
'--verbose[Make some output more verbose]' \
2021-03-14 01:39:33 +05:30
- installed_formula \
'*::installed_formula:__brew_installed_formulae'
2016-09-12 05:28:14 -05:00
}
2021-01-24 01:59:31 -05:00
# brew list
2016-09-12 05:28:14 -05:00
_brew_list() {
_arguments \
2024-12-11 11:04:30 +08:00
'(--cask --versions --pinned -l)--built-from-source[List the formulae compiled from source]' \
2021-01-24 01:59:31 -05:00
'--debug[Display any debugging information]' \
2024-12-11 11:04:30 +08:00
'(--versions --pinned -l -r -t)--full-name[Print formulae with fully-qualified names. Unless `--full-name`, `--versions` or `--pinned` are passed, other options (i.e. `-1`, `-l`, `-r` and `-t`) are passed to `ls`(1) which produces the actual output]' \
2021-01-24 01:59:31 -05:00
'--help[Show this message]' \
2024-12-11 11:04:30 +08:00
'(--cask --versions --pinned -l)--installed-as-dependency[List the formulae installed as dependencies]' \
'(--cask --versions --pinned -l)--installed-on-request[List the formulae installed on request]' \
2022-03-29 12:43:00 +00:00
'(--cask --pinned)--multiple[Only show formulae with multiple versions installed]' \
2024-09-26 20:23:08 -04:00
'(--cask --multiple --installed-on-request --installed-as-dependency --poured-from-bottle --built-from-source -1 -l -r -t --full-name)--pinned[List only pinned formulae, or only the specified (pinned) formulae if formula are provided. See also `pin`, `unpin`]' \
2024-12-11 11:04:30 +08:00
'(--cask --versions --pinned -l)--poured-from-bottle[List the formulae installed from a bottle]' \
2021-01-24 01:59:31 -05:00
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]' \
2024-09-26 20:23:08 -04:00
'(--installed-on-request --installed-as-dependency --poured-from-bottle --built-from-source -1 -l -r -t --full-name)--versions[Show the version number for installed formulae, or only the specified formulae if formula are provided]' \
'(--versions --pinned)-1[Force output to be one entry per line. This is the default when output is not to a terminal]' \
'(--installed-on-request --installed-as-dependency --poured-from-bottle --built-from-source --versions --pinned --full-name)-l[List formulae and/or casks in long format. Has no effect when a formula or cask name is passed as an argument]' \
'(--versions --pinned --full-name)-r[Reverse the order of the formulae and/or casks sort to list the oldest entries first. Has no effect when a formula or cask name is passed as an argument]' \
'(--versions --pinned --full-name)-t[Sort formulae and/or casks by time modified, listing most recently modified first. Has no effect when a formula or cask name is passed as an argument]' \
2021-03-14 01:39:33 +05:30
- installed_formula \
2022-02-24 08:47:21 +00:00
'(--cask)--formula[List only formulae, or treat all named arguments as formulae]' \
2021-03-14 01:39:33 +05:30
'*::installed_formula:__brew_installed_formulae' \
- installed_cask \
2024-08-23 07:07:41 +00:00
'(--formula --pinned --multiple --installed-on-request --installed-as-dependency --poured-from-bottle --built-from-source)--cask[List only casks, or treat all named arguments as casks]' \
2021-03-14 01:39:33 +05:30
'*::installed_cask:__brew_installed_casks'
2021-01-24 01:59:31 -05:00
}
# brew livecheck
2020-08-02 00:59:36 +05:30
_brew_livecheck() {
_arguments \
2025-01-04 15:38:38 +00:00
'--autobump[Include packages that are autobumped by BrewTestBot. By default these are skipped]' \
2021-01-27 13:45:11 +11:00
'(--json)--debug[Display any debugging information]' \
2022-09-05 13:57:22 +01:00
'(--tap --installed)--eval-all[Evaluate all available formulae and casks, whether installed or not, to check them]' \
2024-04-08 13:35:25 +01:00
'(--formula)--extract-plist[Enable checking multiple casks with ExtractPlist strategy]' \
2022-09-05 13:57:22 +01:00
'--full-name[Print formulae and casks with fully-qualified names]' \
2021-01-24 01:59:31 -05:00
'--help[Show this message]' \
2022-09-05 13:57:22 +01:00
'(--tap --eval-all)--installed[Check formulae and casks that are currently installed]' \
2021-01-27 13:45:11 +11:00
'(--debug)--json[Output information in JSON format]' \
2021-01-24 01:59:31 -05:00
'--newer-only[Show the latest version only if it'\''s newer than the formula/cask]' \
'--quiet[Suppress warnings, don'\''t print a progress bar for JSON output]' \
2022-10-02 17:32:21 +00:00
'--resources[Also check resources for formulae]' \
2022-09-05 13:57:22 +01:00
'(--eval-all --installed)--tap[Check formulae and casks within the given tap, specified as user`/`repo]' \
2021-01-24 01:59:31 -05:00
'--verbose[Make some output more verbose]' \
2021-03-14 01:39:33 +05:30
- formula \
2024-03-21 11:47:37 +00:00
'(--cask --extract-plist)--formula[Only check formulae]' \
2021-03-14 01:39:33 +05:30
'*::formula:__brew_formulae' \
- cask \
'(--formula)--cask[Only check casks]' \
'*::cask:__brew_casks'
2021-01-24 01:59:31 -05:00
}
# brew ln
_brew_ln() {
_arguments \
2021-05-26 15:49:24 +00:00
'--HEAD[Link the HEAD version of the formula if it is installed]' \
2021-01-24 01:59:31 -05:00
'--debug[Display any debugging information]' \
'--dry-run[List files which would be linked or deleted by `brew link --overwrite` without actually linking or deleting any files]' \
'--force[Allow keg-only formulae to be linked]' \
'--help[Show this message]' \
'--overwrite[Delete files that already exist in the prefix while linking]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]' \
2021-03-14 01:39:33 +05:30
- installed_formula \
'*::installed_formula:__brew_installed_formulae'
2020-08-02 00:59:36 +05:30
}
2021-01-24 01:59:31 -05:00
# brew log
2016-09-12 05:28:14 -05:00
_brew_log() {
2021-01-24 01:59:31 -05:00
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
2024-09-26 20:23:08 -04:00
'(-1)--max-count[Print only a specified number of commits]' \
2021-01-24 01:59:31 -05:00
'--oneline[Print only one line per commit]' \
'--patch[Also print patch from commit]' \
'--quiet[Make some output more quiet]' \
'--stat[Also print diffstat from commit]' \
'--verbose[Make some output more verbose]' \
2024-09-26 20:23:08 -04:00
'(--max-count)-1[Print only one commit]' \
2021-03-14 01:39:33 +05:30
- formula \
2021-09-30 08:15:06 +00:00
'(--cask)--formula[Treat all named arguments as formulae]' \
'*::formula:__brew_formulae' \
- cask \
'(--formula)--cask[Treat all named arguments as casks]' \
'*::cask:__brew_casks'
2021-01-24 01:59:31 -05:00
}
# brew ls
_brew_ls() {
_arguments \
2024-12-11 11:04:30 +08:00
'(--cask --versions --pinned -l)--built-from-source[List the formulae compiled from source]' \
2021-01-24 01:59:31 -05:00
'--debug[Display any debugging information]' \
2024-12-11 11:04:30 +08:00
'(--versions --pinned -l -r -t)--full-name[Print formulae with fully-qualified names. Unless `--full-name`, `--versions` or `--pinned` are passed, other options (i.e. `-1`, `-l`, `-r` and `-t`) are passed to `ls`(1) which produces the actual output]' \
2021-01-24 01:59:31 -05:00
'--help[Show this message]' \
2024-12-11 11:04:30 +08:00
'(--cask --versions --pinned -l)--installed-as-dependency[List the formulae installed as dependencies]' \
'(--cask --versions --pinned -l)--installed-on-request[List the formulae installed on request]' \
2022-03-29 12:43:00 +00:00
'(--cask --pinned)--multiple[Only show formulae with multiple versions installed]' \
2024-09-26 20:23:08 -04:00
'(--cask --multiple --installed-on-request --installed-as-dependency --poured-from-bottle --built-from-source -1 -l -r -t --full-name)--pinned[List only pinned formulae, or only the specified (pinned) formulae if formula are provided. See also `pin`, `unpin`]' \
2024-12-11 11:04:30 +08:00
'(--cask --versions --pinned -l)--poured-from-bottle[List the formulae installed from a bottle]' \
2021-01-24 01:59:31 -05:00
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]' \
2024-09-26 20:23:08 -04:00
'(--installed-on-request --installed-as-dependency --poured-from-bottle --built-from-source -1 -l -r -t --full-name)--versions[Show the version number for installed formulae, or only the specified formulae if formula are provided]' \
'(--versions --pinned)-1[Force output to be one entry per line. This is the default when output is not to a terminal]' \
'(--installed-on-request --installed-as-dependency --poured-from-bottle --built-from-source --versions --pinned --full-name)-l[List formulae and/or casks in long format. Has no effect when a formula or cask name is passed as an argument]' \
'(--versions --pinned --full-name)-r[Reverse the order of the formulae and/or casks sort to list the oldest entries first. Has no effect when a formula or cask name is passed as an argument]' \
'(--versions --pinned --full-name)-t[Sort formulae and/or casks by time modified, listing most recently modified first. Has no effect when a formula or cask name is passed as an argument]' \
2021-03-14 01:39:33 +05:30
- installed_formula \
2022-02-24 08:47:21 +00:00
'(--cask)--formula[List only formulae, or treat all named arguments as formulae]' \
2021-03-14 01:39:33 +05:30
'*::installed_formula:__brew_installed_formulae' \
- installed_cask \
2024-08-23 07:07:41 +00:00
'(--formula --pinned --multiple --installed-on-request --installed-as-dependency --poured-from-bottle --built-from-source)--cask[List only casks, or treat all named arguments as casks]' \
2021-03-14 01:39:33 +05:30
'*::installed_cask:__brew_installed_casks'
2016-09-12 05:28:14 -05:00
}
2021-01-24 01:59:31 -05:00
# brew migrate
2016-09-12 05:28:14 -05:00
_brew_migrate() {
_arguments \
2021-01-24 01:59:31 -05:00
'--debug[Display any debugging information]' \
2021-08-31 12:27:14 -04:00
'--dry-run[Show what would be migrated, but do not actually migrate anything]' \
2021-01-24 01:59:31 -05:00
'--force[Treat installed formula and provided formula as if they are from the same taps and migrate them anyway]' \
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]' \
2021-03-14 01:39:33 +05:30
- installed_formula \
2023-05-14 18:47:44 +00:00
'(--cask)--formula[Only migrate formulae]' \
'*::installed_formula:__brew_installed_formulae' \
- installed_cask \
'(--formula)--cask[Only migrate casks]' \
'*::installed_cask:__brew_installed_casks'
2016-09-12 05:28:14 -05:00
}
2021-01-24 01:59:31 -05:00
# brew missing
2016-09-12 05:28:14 -05:00
_brew_missing() {
2021-01-24 01:59:31 -05:00
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--hide[Act as if none of the specified hidden are installed. hidden should be a comma-separated list of formulae]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]' \
2021-03-14 01:39:33 +05:30
- formula \
'*::formula:__brew_formulae'
2016-09-12 05:28:14 -05:00
}
2023-03-15 17:30:13 +00:00
# brew nodenv-sync
_brew_nodenv_sync() {
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]'
}
2021-01-24 01:59:31 -05:00
# brew options
2016-09-12 05:28:14 -05:00
_brew_options() {
_arguments \
2021-01-27 13:45:11 +11:00
'(--installed --all)--command[Show options for the specified command]' \
2021-01-24 01:59:31 -05:00
'--compact[Show all options on a single line separated by spaces]' \
'--debug[Display any debugging information]' \
2022-09-05 13:57:22 +01:00
'--eval-all[Evaluate all available formulae and casks, whether installed or not, to show their options]' \
2021-01-24 01:59:31 -05:00
'--help[Show this message]' \
2021-01-27 13:45:11 +11:00
'(--all --command)--installed[Show options for formulae that are currently installed]' \
2021-01-24 01:59:31 -05:00
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]' \
2021-03-14 01:39:33 +05:30
- formula \
'*::formula:__brew_formulae'
2021-01-24 01:59:31 -05:00
}
# brew outdated
2016-09-12 05:28:14 -05:00
_brew_outdated() {
_arguments \
2021-01-24 01:59:31 -05:00
'--debug[Display any debugging information]' \
'--fetch-HEAD[Fetch the upstream repository to detect if the HEAD installation of the formula is outdated. Otherwise, the repository'\''s HEAD will only be checked for updates when a new stable or development version has been released]' \
2022-06-20 17:34:59 +00:00
'--greedy[Also include outdated casks with `auto_updates true` or `version :latest`]' \
'--greedy-auto-updates[Also include outdated casks including those with `auto_updates true`]' \
'--greedy-latest[Also include outdated casks including those with `version :latest`]' \
2021-01-24 01:59:31 -05:00
'--help[Show this message]' \
2021-09-14 21:03:03 +08:00
'(--quiet --verbose)--json[Print output in JSON format. There are two versions: `v1` and `v2`. `v1` is deprecated and is currently the default if no version is specified. `v2` prints outdated formulae and casks]' \
2021-01-27 13:45:11 +11:00
'(--verbose --json)--quiet[List only the names of outdated kegs (takes precedence over `--verbose`)]' \
'(--quiet --json)--verbose[Include detailed version information]' \
2021-03-14 01:39:33 +05:30
- formula \
'(--cask)--formula[List only outdated formulae]' \
'*::formula:__brew_formulae' \
- cask \
'(--formula)--cask[List only outdated casks]' \
'*::cask:__brew_casks'
2021-01-24 01:59:31 -05:00
}
# brew pin
2016-09-12 05:28:14 -05:00
_brew_pin() {
2021-01-24 01:59:31 -05:00
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]' \
2021-03-14 01:39:33 +05:30
- installed_formula \
'*::installed_formula:__brew_installed_formulae'
2016-09-12 05:28:14 -05:00
}
2023-07-28 11:26:09 +01:00
# brew post_install
_brew_post_install() {
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]' \
- installed_formula \
'*::installed_formula:__brew_installed_formulae'
}
2021-01-24 01:59:31 -05:00
# brew postinstall
2016-09-12 05:28:14 -05:00
_brew_postinstall() {
_arguments \
2021-01-24 01:59:31 -05:00
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]' \
2021-03-14 01:39:33 +05:30
- installed_formula \
'*::installed_formula:__brew_installed_formulae'
2016-09-12 05:28:14 -05:00
}
2021-01-24 01:59:31 -05:00
# brew pr-automerge
_brew_pr_automerge() {
2016-09-12 05:28:14 -05:00
_arguments \
2023-03-28 14:29:30 +00:00
'--autosquash[Instruct `brew pr-publish` to automatically reformat and reword commits in the pull request to the preferred format]' \
2021-01-24 01:59:31 -05:00
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--ignore-failures[Include pull requests that have failing status checks]' \
'--publish[Run `brew pr-publish` on matching pull requests]' \
'--quiet[Make some output more quiet]' \
'--tap[Target tap repository (default: `homebrew/core`)]' \
'--verbose[Make some output more verbose]' \
'--with-label[Pull requests must have this label]' \
'--without-approval[Pull requests do not require approval to be merged]' \
2023-04-21 07:43:18 +00:00
'--without-labels[Pull requests must not have these labels (default: `do not merge`, `new formula`, `automerge-skip`, `pre-release`, `CI-published-bottle-commits`)]' \
2022-04-25 19:21:20 +00:00
'--workflow[Workflow file to use with `brew pr-publish`]'
2021-01-24 01:59:31 -05:00
}
# brew pr-publish
_brew_pr_publish() {
_arguments \
2023-03-28 16:19:00 +00:00
'--autosquash[If supported on the target tap, automatically reformat and reword commits to our preferred format]' \
2023-03-28 14:29:30 +00:00
'--branch[Branch to use the workflow from (default: `master`)]' \
2021-01-24 01:59:31 -05:00
'--debug[Display any debugging information]' \
'--help[Show this message]' \
2023-03-28 14:29:30 +00:00
'--large-runner[Run the upload job on a large runner]' \
2024-03-10 03:56:25 +00:00
'--message[Message to include when autosquashing revision bumps, deletions and rebuilds]' \
2021-01-24 01:59:31 -05:00
'--quiet[Make some output more quiet]' \
'--tap[Target tap repository (default: `homebrew/core`)]' \
'--verbose[Make some output more verbose]' \
'--workflow[Target workflow filename (default: `publish-commit-bottles.yml`)]'
2016-09-12 05:28:14 -05:00
}
2021-01-24 01:59:31 -05:00
# brew pr-pull
2020-04-05 11:08:48 -04:00
_brew_pr_pull() {
_arguments \
2024-04-17 05:59:29 +08:00
'--artifact-pattern[Download artifacts with the specified pattern (default: `bottles{,_*}`)]' \
2023-03-28 14:29:30 +00:00
'(--clean)--autosquash[Automatically reformat and reword commits in the pull request to our preferred format]' \
2021-01-24 01:59:31 -05:00
'--branch-okay[Do not warn if pulling to a branch besides the repository default (useful for testing)]' \
2023-03-28 14:29:30 +00:00
'(--autosquash)--clean[Do not amend the commits from pull requests]' \
2021-04-01 17:14:57 +00:00
'--committer[Specify a committer name and email in `git`'\''s standard author format]' \
2021-01-24 01:59:31 -05:00
'--debug[Display any debugging information]' \
'--dry-run[Print what would be done rather than doing it]' \
'--help[Show this message]' \
'--ignore-missing-artifacts[Comma-separated list of workflows which can be ignored if they have not been run]' \
'--keep-old[If the formula specifies a rebuild version, attempt to preserve its value in the generated DSL]' \
2024-03-10 03:56:25 +00:00
'--message[Message to include when autosquashing revision bumps, deletions and rebuilds]' \
2023-03-19 21:33:22 +00:00
'--no-cherry-pick[Do not cherry-pick commits from the pull request branch]' \
2021-04-02 16:47:56 +01:00
'--no-commit[Do not generate a new commit before uploading]' \
2021-06-07 15:16:48 +05:30
'--no-upload[Download the bottles but don'\''t upload them]' \
2021-01-24 01:59:31 -05:00
'--quiet[Make some output more quiet]' \
'--resolve[When a patch fails to apply, leave in progress and allow user to resolve, instead of aborting]' \
2024-01-26 14:03:20 +00:00
'--retain-bottle-dir[Does not clean up the tmp directory for the bottle so it can be used later]' \
2021-01-24 01:59:31 -05:00
'--root-url[Use the specified URL as the root of the bottle'\''s URL instead of Homebrew'\''s default]' \
2021-04-29 18:58:20 +00:00
'--root-url-using[Use the specified download strategy class for downloading the bottle'\''s URL instead of Homebrew'\''s default]' \
2021-01-24 01:59:31 -05:00
'--tap[Target tap repository (default: `homebrew/core`)]' \
'--verbose[Make some output more verbose]' \
'--warn-on-upload-failure[Warn instead of raising an error if the bottle upload fails. Useful for repairing bottle uploads that previously failed]' \
'--workflows[Retrieve artifacts from the specified workflow (default: `tests.yml`). Can be a comma-separated list to include multiple workflows]'
}
# brew pr-upload
_brew_pr_upload() {
_arguments \
2021-04-01 17:14:57 +00:00
'--committer[Specify a committer name and email in `git`'\''s standard author format]' \
2021-01-24 01:59:31 -05:00
'--debug[Display any debugging information]' \
'--dry-run[Print what would be done rather than doing it]' \
'--help[Show this message]' \
2025-02-03 18:15:31 +01:00
'--keep-old[If the formula specifies a rebuild version, attempt to preserve its value in the generated DSL. When using GitHub Packages, this also appends the manifest to the existing list]' \
2021-10-21 11:08:38 +00:00
'(--upload-only)--no-commit[Do not generate a new commit before uploading]' \
2021-01-24 01:59:31 -05:00
'--quiet[Make some output more quiet]' \
'--root-url[Use the specified URL as the root of the bottle'\''s URL instead of Homebrew'\''s default]' \
2021-04-29 18:58:20 +00:00
'--root-url-using[Use the specified download strategy class for downloading the bottle'\''s URL instead of Homebrew'\''s default]' \
2025-02-03 18:15:31 +01:00
'(--no-commit)--upload-only[Skip running `brew bottle` before uploading]' \
2021-01-24 01:59:31 -05:00
'--verbose[Make some output more verbose]' \
'--warn-on-upload-failure[Warn instead of raising an error if the bottle upload fails. Useful for repairing bottle uploads that previously failed]'
}
# brew prof
_brew_prof() {
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--stackprof[Use `stackprof` instead of `ruby-prof` (the default)]' \
'--verbose[Make some output more verbose]' \
2024-05-20 15:36:56 +00:00
'--vernier[Use `vernier` instead of `ruby-prof` (the default)]' \
2021-03-14 01:39:33 +05:30
- command \
'*::command:__brew_commands'
2020-04-05 11:08:48 -04:00
}
2023-06-29 20:40:32 +00:00
# brew pyenv-sync
_brew_pyenv_sync() {
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]'
}
2023-03-15 17:30:13 +00:00
# brew rbenv-sync
_brew_rbenv_sync() {
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]'
}
2021-01-24 01:59:31 -05:00
# brew readall
2016-09-12 05:28:14 -05:00
_brew_readall() {
2021-01-24 01:59:31 -05:00
_arguments \
'--aliases[Verify any alias symlinks in each tap]' \
2023-05-24 21:07:51 +00:00
'--arch[Read using the given CPU architecture. (Pass `all` to simulate all architectures.)]' \
2021-01-24 01:59:31 -05:00
'--debug[Display any debugging information]' \
2025-01-27 14:21:27 +00:00
'--eval-all[Evaluate all available formulae and casks, whether installed or not. Implied if `$HOMEBREW_EVAL_ALL` is set]' \
2021-01-24 01:59:31 -05:00
'--help[Show this message]' \
2022-10-10 22:59:07 -04:00
'--no-simulate[Don'\''t simulate other system configurations when checking formulae and casks]' \
2023-05-24 21:07:51 +00:00
'--os[Read using the given operating system. (Pass `all` to simulate all operating systems.)]' \
2021-01-24 01:59:31 -05:00
'--quiet[Make some output more quiet]' \
2023-09-09 12:09:38 -04:00
'--syntax[Syntax-check all of Homebrew'\''s Ruby files (if no tap is passed)]' \
2021-01-24 01:59:31 -05:00
'--verbose[Make some output more verbose]' \
2021-03-14 01:39:33 +05:30
- tap \
'*::tap:__brew_any_tap'
2016-09-12 05:28:14 -05:00
}
2021-01-24 01:59:31 -05:00
# brew reinstall
2016-09-12 05:28:14 -05:00
_brew_reinstall() {
_arguments \
2024-02-04 15:19:29 +01:00
'(--formula)--adopt[Adopt existing artifacts in the destination that are identical to those being installed. Cannot be combined with `--force`]' \
2021-01-27 13:45:11 +11:00
'(--formula)--appdir[Target location for Applications (default: `/Applications`)]' \
2025-03-11 10:09:23 +00:00
'(--cask)--ask[Ask for confirmation before downloading and upgrading formulae. Print bottles and dependencies download size, install and net install size]' \
2025-01-27 15:12:50 +00:00
'(--formula)--audio-unit-plugindir[Target location for Audio Unit Plugins (default: `~/Library/Audio/Plug-Ins/Components`)]' \
2021-01-27 13:45:11 +11:00
'(--formula)--binaries[Disable/enable linking of helper executables (default: enabled)]' \
'(--cask --force-bottle)--build-from-source[Compile formula from source even if a bottle is available]' \
2025-01-27 15:12:50 +00:00
'(--formula)--colorpickerdir[Target location for Color Pickers (default: `~/Library/ColorPickers`)]' \
2021-01-24 01:59:31 -05:00
'--debug[If brewing fails, open an interactive debugging session with access to IRB or a shell inside the temporary build directory]' \
2023-02-10 23:15:40 -05:00
'(--cask)--debug-symbols[Generate debug symbols on build. Source will be retained in a cache directory]' \
2025-01-27 15:12:50 +00:00
'(--formula)--dictionarydir[Target location for Dictionaries (default: `~/Library/Dictionaries`)]' \
2024-04-09 08:37:19 +00:00
'--display-times[Print install times for each package at the end of the run]' \
2025-01-27 15:12:50 +00:00
'(--formula)--fontdir[Target location for Fonts (default: `~/Library/Fonts`)]' \
2021-01-24 01:59:31 -05:00
'--force[Install without checking for previously installed keg-only or non-migrated versions]' \
2021-01-27 13:45:11 +11:00
'(--cask --build-from-source)--force-bottle[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]' \
2021-07-01 10:31:00 +00:00
'(--cask)--git[Create a Git repository, useful for creating patches to the software]' \
2021-01-27 13:45:11 +11:00
'--help[Show this message]' \
2025-01-27 15:12:50 +00:00
'(--formula)--input-methoddir[Target location for Input Methods (default: `~/Library/Input Methods`)]' \
2021-01-27 13:45:11 +11:00
'(--cask)--interactive[Download and patch formula, then open a shell. This allows the user to run `./configure --help` and otherwise determine how to turn the software package into a Homebrew package]' \
2025-01-27 15:12:50 +00:00
'(--formula)--internet-plugindir[Target location for Internet Plugins (default: `~/Library/Internet Plug-Ins`)]' \
2021-01-27 13:45:11 +11:00
'(--cask)--keep-tmp[Retain the temporary files created during installation]' \
2023-03-27 13:56:29 +00:00
'(--formula)--keyboard-layoutdir[Target location for Keyboard Layouts (default: `/Library/Keyboard Layouts`)]' \
2021-01-27 13:45:11 +11:00
'(--formula)--language[Comma-separated list of language codes to prefer for cask installation. The first matching language is used, otherwise it reverts to the cask'\''s default language. The default value is the language of your system]' \
2025-01-27 15:12:50 +00:00
'(--formula)--mdimporterdir[Target location for Spotlight Plugins (default: `~/Library/Spotlight`)]' \
2021-01-24 01:59:31 -05:00
'--no-binaries[Disable/enable linking of helper executables (default: enabled)]' \
'--no-quarantine[Disable/enable quarantining of downloads (default: enabled)]' \
2025-01-27 15:12:50 +00:00
'(--formula)--prefpanedir[Target location for Preference Panes (default: `~/Library/PreferencePanes`)]' \
'(--formula)--qlplugindir[Target location for Quick Look Plugins (default: `~/Library/QuickLook`)]' \
2021-01-27 13:45:11 +11:00
'(--formula)--quarantine[Disable/enable quarantining of downloads (default: enabled)]' \
'--quiet[Make some output more quiet]' \
'(--formula)--require-sha[Require all casks to have a checksum]' \
2025-01-27 15:12:50 +00:00
'(--formula)--screen-saverdir[Target location for Screen Savers (default: `~/Library/Screen Savers`)]' \
'(--formula)--servicedir[Target location for Services (default: `~/Library/Services`)]' \
2021-01-27 13:45:11 +11:00
'(--formula)--skip-cask-deps[Skip installing cask dependencies]' \
2023-09-09 12:09:38 -04:00
'--verbose[Print the verification and post-install steps]' \
2025-01-27 15:12:50 +00:00
'(--formula)--vst-plugindir[Target location for VST Plugins (default: `~/Library/Audio/Plug-Ins/VST`)]' \
'(--formula)--vst3-plugindir[Target location for VST3 Plugins (default: `~/Library/Audio/Plug-Ins/VST3`)]' \
2022-04-12 09:39:11 +00:00
'(--formula)--zap[For use with `brew reinstall --cask`. Remove all files associated with a cask. *May remove files which are shared between applications.*]' \
2021-03-14 01:39:33 +05:30
- formula \
2023-03-27 13:56:29 +00:00
'(--casks --binaries --require-sha --quarantine --adopt --skip-cask-deps --zap --appdir --keyboard-layoutdir --colorpickerdir --prefpanedir --qlplugindir --mdimporterdir --dictionarydir --fontdir --servicedir --input-methoddir --internet-plugindir --audio-unit-plugindir --vst-plugindir --vst3-plugindir --screen-saverdir --language)--formula[Treat all named arguments as formulae]' \
2021-03-14 01:39:33 +05:30
'*::formula:__brew_formulae' \
- cask \
2025-03-11 10:09:23 +00:00
'(--formulae --build-from-source --interactive --force-bottle --keep-tmp --debug-symbols --git --ask)--cask[Treat all named arguments as casks]' \
2021-03-14 01:39:33 +05:30
'*::cask:__brew_casks'
2021-01-24 01:59:31 -05:00
}
# brew release
_brew_release() {
2016-09-12 05:28:14 -05:00
_arguments \
2021-01-24 01:59:31 -05:00
'--debug[Display any debugging information]' \
'--help[Show this message]' \
2021-01-27 13:45:11 +11:00
'(--minor)--major[Create a major release]' \
'(--major)--minor[Create a minor release]' \
2021-01-24 01:59:31 -05:00
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]'
2016-09-12 05:28:14 -05:00
}
2021-01-24 01:59:31 -05:00
# brew remove
_brew_remove() {
_arguments \
'--debug[Display any debugging information]' \
'--force[Delete all installed versions of formula. Uninstall even if cask is not installed, overwrite existing files and ignore errors when removing files]' \
'--help[Show this message]' \
'--ignore-dependencies[Don'\''t fail uninstall, even if formula is a dependency of any installed formulae]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]' \
2021-01-27 13:45:11 +11:00
'(--formula)--zap[Remove all files associated with a cask. *May remove files which are shared between applications.*]' \
2021-03-14 01:39:33 +05:30
- installed_formula \
2021-03-16 10:55:34 +05:30
'(--cask --zap)--formula[Treat all named arguments as formulae]' \
2021-03-14 01:39:33 +05:30
'*::installed_formula:__brew_installed_formulae' \
- installed_cask \
2021-03-16 10:55:34 +05:30
'(--formula)--cask[Treat all named arguments as casks]' \
2021-03-14 01:39:33 +05:30
'*::installed_cask:__brew_installed_casks'
2021-01-24 01:59:31 -05:00
}
# brew rm
_brew_rm() {
2016-09-12 05:28:14 -05:00
_arguments \
2021-01-24 01:59:31 -05:00
'--debug[Display any debugging information]' \
'--force[Delete all installed versions of formula. Uninstall even if cask is not installed, overwrite existing files and ignore errors when removing files]' \
'--help[Show this message]' \
'--ignore-dependencies[Don'\''t fail uninstall, even if formula is a dependency of any installed formulae]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]' \
2021-01-27 13:45:11 +11:00
'(--formula)--zap[Remove all files associated with a cask. *May remove files which are shared between applications.*]' \
2021-03-14 01:39:33 +05:30
- installed_formula \
2021-03-16 10:55:34 +05:30
'(--cask --zap)--formula[Treat all named arguments as formulae]' \
2021-03-14 01:39:33 +05:30
'*::installed_formula:__brew_installed_formulae' \
- installed_cask \
2021-03-16 10:55:34 +05:30
'(--formula)--cask[Treat all named arguments as casks]' \
2021-03-14 01:39:33 +05:30
'*::installed_cask:__brew_installed_casks'
2021-01-24 01:59:31 -05:00
}
2024-07-14 16:18:26 -04:00
# brew rubocop
_brew_rubocop() {
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]'
}
2021-01-24 01:59:31 -05:00
# brew ruby
_brew_ruby() {
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]' \
'-e[Execute the given text string as a script]' \
'-r[Load a library using `require`]' \
2021-03-14 01:39:33 +05:30
- file \
'*::file:__brew_formulae_or_ruby_files'
2016-09-12 05:28:14 -05:00
}
2024-04-26 18:23:27 +00:00
# brew rubydoc
_brew_rubydoc() {
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--only-public[Only generate public API documentation]' \
'--open[Open generated documentation in a browser]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]'
}
2021-01-24 01:59:31 -05:00
# brew search
_brew_search() {
_arguments \
2021-10-20 00:06:39 +00:00
'(--repology --macports --fink --opensuse --fedora --debian --ubuntu)--archlinux[Search for text in the given database]' \
2023-04-12 00:00:48 +01:00
'--cask[Search for casks]' \
2021-01-27 13:45:11 +11:00
'(--open)--closed[Search for only closed GitHub pull requests]' \
2021-10-20 00:06:39 +00:00
'(--repology --macports --fink --opensuse --fedora --archlinux --ubuntu)--debian[Search for text in the given database]' \
2021-01-24 01:59:31 -05:00
'--debug[Display any debugging information]' \
2022-03-23 00:03:11 -04:00
'(--pull-request)--desc[Search for formulae with a description matching text and casks with a name or description matching text]' \
2025-01-27 14:21:27 +00:00
'--eval-all[Evaluate all available formulae and casks, whether installed or not, to search their descriptions. Implied if `$HOMEBREW_EVAL_ALL` is set]' \
2021-10-20 00:06:39 +00:00
'(--repology --macports --fink --opensuse --archlinux --debian --ubuntu)--fedora[Search for text in the given database]' \
'(--repology --macports --opensuse --fedora --archlinux --debian --ubuntu)--fink[Search for text in the given database]' \
2023-04-12 00:00:48 +01:00
'--formula[Search for formulae]' \
2021-01-24 01:59:31 -05:00
'--help[Show this message]' \
2021-10-20 00:06:39 +00:00
'(--repology --fink --opensuse --fedora --archlinux --debian --ubuntu)--macports[Search for text in the given database]' \
2021-01-27 13:45:11 +11:00
'(--closed)--open[Search for only open GitHub pull requests]' \
2021-10-20 00:06:39 +00:00
'(--repology --macports --fink --fedora --archlinux --debian --ubuntu)--opensuse[Search for text in the given database]' \
2021-01-27 13:45:11 +11:00
'(--desc)--pull-request[Search for GitHub pull requests containing text]' \
2021-01-24 01:59:31 -05:00
'--quiet[Make some output more quiet]' \
2021-10-20 00:06:39 +00:00
'(--macports --fink --opensuse --fedora --archlinux --debian --ubuntu)--repology[Search for text in the given database]' \
'(--repology --macports --fink --opensuse --fedora --archlinux --debian)--ubuntu[Search for text in the given database]' \
2021-01-24 01:59:31 -05:00
'--verbose[Make some output more verbose]'
}
2025-03-14 08:43:39 +00:00
# brew services
_brew_services() {
_arguments \
'--all[Run subcommand on all services]' \
'--debug[Display any debugging information]' \
'--file[Use the service file from this location to `start` the service]' \
'--help[Show this message]' \
'--json[Output as JSON]' \
'(--no-wait)--max-wait[Wait at most this many seconds for `stop` to finish stopping a service. Omit this flag or set this to zero (0) seconds to wait indefinitely]' \
'(--max-wait)--no-wait[Don'\''t wait for `stop` to finish stopping the service]' \
'--quiet[Make some output more quiet]' \
'--sudo-service-user[When run as root on macOS, run the service(s) as this user]' \
'--verbose[Make some output more verbose]'
}
2024-07-14 16:18:26 -04:00
# brew setup-ruby
_brew_setup_ruby() {
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]' \
- command \
'*::command:__brew_commands'
}
2021-01-24 01:59:31 -05:00
# brew sh
_brew_sh() {
_arguments \
'--cmd[Execute commands in a non-interactive shell]' \
'--debug[Display any debugging information]' \
'--env[Use the standard `PATH` instead of superenv'\''s when `std` is passed]' \
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]' \
2021-03-14 01:39:33 +05:30
- file \
'*::file:__brew_formulae_or_ruby_files'
2016-09-12 05:28:14 -05:00
}
2024-07-14 16:18:26 -04:00
# brew shellenv
_brew_shellenv() {
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]'
}
2021-01-24 01:59:31 -05:00
# brew style
_brew_style() {
_arguments \
'--debug[Display any debugging information]' \
2021-01-27 13:45:11 +11:00
'(--only-cops)--except-cops[Specify a comma-separated cops list to skip checking for violations of the listed RuboCop cops]' \
2021-01-24 01:59:31 -05:00
'--fix[Fix style violations automatically using RuboCop'\''s auto-correct feature]' \
'--help[Show this message]' \
2021-01-27 13:45:11 +11:00
'(--except-cops)--only-cops[Specify a comma-separated cops list to check for violations of only the listed RuboCop cops]' \
2021-01-24 01:59:31 -05:00
'--quiet[Make some output more quiet]' \
'--reset-cache[Reset the RuboCop cache]' \
'--verbose[Make some output more verbose]' \
2021-03-14 01:39:33 +05:30
- file \
'*::file:__brew_formulae_or_ruby_files' \
- tap \
'*::tap:__brew_any_tap' \
- formula \
'(--cask)--formula[Treat all named arguments as formulae]' \
'*::formula:__brew_formulae' \
- cask \
'(--formula)--cask[Treat all named arguments as casks]' \
'*::cask:__brew_casks'
2021-01-24 01:59:31 -05:00
}
2024-04-28 11:25:06 +08:00
# brew tab
_brew_tab() {
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
2024-07-13 14:55:53 +00:00
'(--no-installed-on-request)--installed-on-request[Mark installed_formula or installed_cask as installed on request]' \
'(--installed-on-request)--no-installed-on-request[Mark installed_formula or installed_cask as not installed on request]' \
2024-04-28 11:25:06 +08:00
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]' \
2024-07-13 14:55:53 +00:00
- installed_formula \
'(--cask)--formula[Only mark formulae]' \
'*::installed_formula:__brew_installed_formulae' \
- installed_cask \
'(--formula)--cask[Only mark casks]' \
'*::installed_cask:__brew_installed_casks'
2024-04-28 11:25:06 +08:00
}
2021-01-24 01:59:31 -05:00
# brew tap
_brew_tap() {
2016-09-12 05:28:14 -05:00
_arguments \
2021-10-11 17:10:19 +08:00
'--custom-remote[Install or change a tap with a custom remote. Useful for mirrors]' \
2021-01-24 01:59:31 -05:00
'--debug[Display any debugging information]' \
2025-01-27 14:21:27 +00:00
'--eval-all[Evaluate all the formulae, casks and aliases in the new tap to check validity. Implied if `$HOMEBREW_EVAL_ALL` is set]' \
2023-07-05 19:15:48 +01:00
'--force[Force install core taps even under API mode]' \
2021-01-24 01:59:31 -05:00
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
2025-02-01 12:26:33 +00:00
'--repair[Add missing symlinks to tap manpages and shell completions. Correct git remote refs for any taps where upstream HEAD branch has been renamed]' \
2021-01-24 01:59:31 -05:00
'--verbose[Make some output more verbose]' \
2021-03-14 01:39:33 +05:30
- tap \
'*::tap:__brew_any_tap'
2021-01-24 01:59:31 -05:00
}
# brew tap-info
_brew_tap_info() {
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--installed[Show information on each installed tap]' \
'--json[Print a JSON representation of tap. Currently the default and only accepted value for version is `v1`. See the docs for examples of using the JSON output: https://docs.brew.sh/Querying-Brew]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]' \
2021-03-14 01:39:33 +05:30
- tap \
'*::tap:__brew_any_tap'
2016-09-12 05:28:14 -05:00
}
2021-01-24 01:59:31 -05:00
# brew tap-new
_brew_tap_new() {
2016-09-12 05:28:14 -05:00
_arguments \
2021-03-01 13:40:08 +00:00
'--branch[Initialize Git repository and setup GitHub Actions workflows with the specified branch name (default: `main`)]' \
2021-01-24 01:59:31 -05:00
'--debug[Display any debugging information]' \
2021-11-23 11:57:59 +00:00
'--github-packages[Upload bottles to GitHub Packages]' \
2021-01-24 01:59:31 -05:00
'--help[Show this message]' \
2021-03-01 13:40:08 +00:00
'--no-git[Don'\''t initialize a Git repository for the tap]' \
2021-01-24 01:59:31 -05:00
'--pull-label[Label name for pull requests ready to be pulled (default: `pr-pull`)]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]' \
2021-03-14 01:39:33 +05:30
- tap \
'*::tap:__brew_any_tap'
2021-01-24 01:59:31 -05:00
}
# brew tc
_brew_tc() {
2016-09-12 05:28:14 -05:00
_arguments \
2021-01-24 01:59:31 -05:00
'--debug[Display any debugging information]' \
2021-01-27 13:45:11 +11:00
'(--file)--dir[Typecheck all files in a specific directory]' \
'(--dir)--file[Typecheck a single file]' \
2024-08-02 23:32:18 +00:00
'(--lsp)--fix[Automatically fix type errors]' \
2021-01-24 01:59:31 -05:00
'--help[Show this message]' \
'--ignore[Ignores input files that contain the given string in their paths (relative to the input path passed to Sorbet)]' \
2024-08-02 23:32:18 +00:00
'(--update --update-all --fix)--lsp[Start the Sorbet LSP server]' \
2021-01-24 01:59:31 -05:00
'--quiet[Silence all non-critical errors]' \
'--suggest-typed[Try upgrading `typed` sigils]' \
2024-08-02 23:32:18 +00:00
'(--lsp)--update[Update RBI files]' \
'(--lsp)--update-all[Update all RBI files rather than just updated gems]' \
2024-08-19 11:57:14 +00:00
'--verbose[Make some output more verbose]' \
- tap \
'*::tap:__brew_any_tap'
2021-01-24 01:59:31 -05:00
}
# brew test
_brew_test() {
_arguments \
2023-10-12 07:58:25 -04:00
'--HEAD[Test the HEAD version of a formula]' \
2021-01-24 01:59:31 -05:00
'--debug[Display any debugging information]' \
2021-03-22 14:15:11 +00:00
'--force[Test formulae even if they are unlinked]' \
2021-01-24 01:59:31 -05:00
'--help[Show this message]' \
'--keep-tmp[Retain the temporary files created for the test]' \
'--quiet[Make some output more quiet]' \
'--retry[Retry if a testing fails]' \
'--verbose[Make some output more verbose]' \
2021-03-14 01:39:33 +05:30
- installed_formula \
'*::installed_formula:__brew_installed_formulae'
2016-09-12 05:28:14 -05:00
}
2021-01-24 01:59:31 -05:00
# brew tests
_brew_tests() {
_arguments \
2022-04-20 00:09:30 +00:00
'(--only)--changed[Only runs tests on files that were changed from the master branch]' \
2021-01-24 01:59:31 -05:00
'--coverage[Generate code coverage reports]' \
2024-04-30 11:10:23 +02:00
'--debug[Enable debugging using `ruby/debug`, or surface the standard `odebug` output]' \
2023-08-10 15:47:51 +01:00
'--fail-fast[Exit early on the first failing test]' \
2021-01-24 01:59:31 -05:00
'--generic[Run only OS-agnostic tests]' \
'--help[Show this message]' \
'--online[Include tests that use the GitHub API and tests that use any of the taps for official external commands]' \
2024-04-30 11:10:23 +02:00
'(--changed)--only[Run only `test_script_spec.rb`. Appending `:line_number` will start at a specific line]' \
2024-01-06 12:51:15 -08:00
'--profile[Run the test suite serially to find the n slowest tests]' \
2021-01-24 01:59:31 -05:00
'--quiet[Make some output more quiet]' \
'--seed[Randomise tests with the specified value instead of a random seed]' \
'--verbose[Make some output more verbose]'
}
# brew typecheck
_brew_typecheck() {
_arguments \
'--debug[Display any debugging information]' \
2021-01-27 13:45:11 +11:00
'(--file)--dir[Typecheck all files in a specific directory]' \
'(--dir)--file[Typecheck a single file]' \
2024-08-02 23:32:18 +00:00
'(--lsp)--fix[Automatically fix type errors]' \
2021-01-24 01:59:31 -05:00
'--help[Show this message]' \
'--ignore[Ignores input files that contain the given string in their paths (relative to the input path passed to Sorbet)]' \
2024-08-02 23:32:18 +00:00
'(--update --update-all --fix)--lsp[Start the Sorbet LSP server]' \
2021-01-24 01:59:31 -05:00
'--quiet[Silence all non-critical errors]' \
'--suggest-typed[Try upgrading `typed` sigils]' \
2024-08-02 23:32:18 +00:00
'(--lsp)--update[Update RBI files]' \
'(--lsp)--update-all[Update all RBI files rather than just updated gems]' \
2024-08-19 11:57:14 +00:00
'--verbose[Make some output more verbose]' \
- tap \
'*::tap:__brew_any_tap'
2021-01-24 01:59:31 -05:00
}
2025-02-07 19:42:46 +00:00
# brew unalias
_brew_unalias() {
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]'
}
2021-01-24 01:59:31 -05:00
# brew unbottled
_brew_unbottled() {
_arguments \
'--debug[Display any debugging information]' \
2023-10-15 15:14:48 -07:00
'(--total --lost)--dependents[Skip getting analytics data and sort by number of dependents instead]' \
2023-02-10 23:15:40 -05:00
'--eval-all[Evaluate all available formulae and casks, whether installed or not, to check them. Implied if `HOMEBREW_EVAL_ALL` is set]' \
2021-01-24 01:59:31 -05:00
'--help[Show this message]' \
2023-10-15 15:14:48 -07:00
'(--dependents --total)--lost[Print the `homebrew/core` commits where bottles were lost in the last week]' \
2021-01-24 01:59:31 -05:00
'--quiet[Make some output more quiet]' \
2021-01-26 15:21:24 -05:00
'--tag[Use the specified bottle tag (e.g. `big_sur`) instead of the current OS]' \
2023-10-15 15:14:48 -07:00
'(--dependents --lost)--total[Print the number of unbottled and total formulae]' \
2021-01-24 01:59:31 -05:00
'--verbose[Make some output more verbose]' \
2021-03-14 01:39:33 +05:30
- formula \
'*::formula:__brew_formulae'
2021-01-24 01:59:31 -05:00
}
# brew uninstal
_brew_uninstal() {
_arguments \
'--debug[Display any debugging information]' \
'--force[Delete all installed versions of formula. Uninstall even if cask is not installed, overwrite existing files and ignore errors when removing files]' \
'--help[Show this message]' \
'--ignore-dependencies[Don'\''t fail uninstall, even if formula is a dependency of any installed formulae]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]' \
2021-01-27 13:45:11 +11:00
'(--formula)--zap[Remove all files associated with a cask. *May remove files which are shared between applications.*]' \
2021-03-14 01:39:33 +05:30
- installed_formula \
2021-03-16 10:55:34 +05:30
'(--cask --zap)--formula[Treat all named arguments as formulae]' \
2021-03-14 01:39:33 +05:30
'*::installed_formula:__brew_installed_formulae' \
- installed_cask \
2021-03-16 10:55:34 +05:30
'(--formula)--cask[Treat all named arguments as casks]' \
2021-03-14 01:39:33 +05:30
'*::installed_cask:__brew_installed_casks'
2021-01-24 01:59:31 -05:00
}
# brew uninstall
2016-09-12 05:28:14 -05:00
_brew_uninstall() {
_arguments \
2021-01-24 01:59:31 -05:00
'--debug[Display any debugging information]' \
'--force[Delete all installed versions of formula. Uninstall even if cask is not installed, overwrite existing files and ignore errors when removing files]' \
'--help[Show this message]' \
'--ignore-dependencies[Don'\''t fail uninstall, even if formula is a dependency of any installed formulae]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]' \
2021-01-27 13:45:11 +11:00
'(--formula)--zap[Remove all files associated with a cask. *May remove files which are shared between applications.*]' \
2021-03-14 01:39:33 +05:30
- installed_formula \
2021-03-16 10:55:34 +05:30
'(--cask --zap)--formula[Treat all named arguments as formulae]' \
2021-03-14 01:39:33 +05:30
'*::installed_formula:__brew_installed_formulae' \
- installed_cask \
2021-03-16 10:55:34 +05:30
'(--formula)--cask[Treat all named arguments as casks]' \
2021-03-14 01:39:33 +05:30
'*::installed_cask:__brew_installed_casks'
2021-01-24 01:59:31 -05:00
}
# brew unlink
2016-09-12 05:28:14 -05:00
_brew_unlink() {
_arguments \
2021-01-24 01:59:31 -05:00
'--debug[Display any debugging information]' \
'--dry-run[List files which would be unlinked without actually unlinking or deleting any files]' \
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]' \
2021-03-14 01:39:33 +05:30
- installed_formula \
'*::installed_formula:__brew_installed_formulae'
2016-09-12 05:28:14 -05:00
}
2021-01-24 01:59:31 -05:00
# brew unpack
2016-09-12 05:28:14 -05:00
_brew_unpack() {
_arguments \
2021-01-24 01:59:31 -05:00
'--debug[Display any debugging information]' \
'--destdir[Create subdirectories in the directory named by path instead]' \
'--force[Overwrite the destination directory if it already exists]' \
2021-01-27 13:45:11 +11:00
'(--patch)--git[Initialise a Git repository in the unpacked source. This is useful for creating patches for the software]' \
2021-01-24 01:59:31 -05:00
'--help[Show this message]' \
2021-01-27 13:45:11 +11:00
'(--git)--patch[Patches for formula will be applied to the unpacked source]' \
2021-01-24 01:59:31 -05:00
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]' \
2021-03-14 01:39:33 +05:30
- formula \
'*::formula:__brew_formulae'
2021-01-24 01:59:31 -05:00
}
# brew unpin
_brew_unpin() {
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]' \
2021-03-14 01:39:33 +05:30
- installed_formula \
'*::installed_formula:__brew_installed_formulae'
2016-09-12 05:28:14 -05:00
}
2021-01-24 01:59:31 -05:00
# brew untap
_brew_untap() {
2016-09-12 05:28:14 -05:00
_arguments \
2021-01-24 01:59:31 -05:00
'--debug[Display any debugging information]' \
2021-02-04 18:36:32 +01:00
'--force[Untap even if formulae or casks from this tap are currently installed]' \
2021-01-24 01:59:31 -05:00
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]' \
2021-03-14 01:39:33 +05:30
- tap \
'*::tap:__brew_any_tap'
2016-09-12 05:28:14 -05:00
}
2021-01-24 01:59:31 -05:00
# brew up
_brew_up() {
_arguments \
2022-05-19 11:04:20 -04:00
'--auto-update[Run on auto-updates (e.g. before `brew install`). Skips some slower steps]' \
2021-01-24 01:59:31 -05:00
'--debug[Display a trace of all shell commands as they are executed]' \
'--force[Always do a slower, full update check (even if unnecessary)]' \
'--help[Show this message]' \
'--merge[Use `git merge` to apply updates (rather than `git rebase`)]' \
2022-05-05 08:59:07 +00:00
'--quiet[Make some output more quiet]' \
2021-01-24 01:59:31 -05:00
'--verbose[Print the directories checked and `git` operations performed]'
}
# brew update
2016-09-12 05:28:14 -05:00
_brew_update() {
_arguments \
2022-05-19 11:04:20 -04:00
'--auto-update[Run on auto-updates (e.g. before `brew install`). Skips some slower steps]' \
2021-01-24 01:59:31 -05:00
'--debug[Display a trace of all shell commands as they are executed]' \
'--force[Always do a slower, full update check (even if unnecessary)]' \
'--help[Show this message]' \
'--merge[Use `git merge` to apply updates (rather than `git rebase`)]' \
2022-05-05 08:59:07 +00:00
'--quiet[Make some output more quiet]' \
2021-01-24 01:59:31 -05:00
'--verbose[Print the directories checked and `git` operations performed]'
}
# brew update-license-data
_brew_update_license_data() {
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]'
2016-09-12 05:28:14 -05:00
}
2021-02-04 17:49:38 +05:30
# brew update-maintainers
_brew_update_maintainers() {
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]'
}
2021-01-24 01:59:31 -05:00
# brew update-python-resources
_brew_update_python_resources() {
_arguments \
'--debug[Display any debugging information]' \
'--exclude-packages[Exclude these packages when finding resources]' \
'--extra-packages[Include these additional packages when finding resources]' \
'--help[Show this message]' \
2025-02-06 17:03:07 +00:00
'--ignore-errors[Record all discovered resources, even those that can'\''t be resolved successfully. This option is ignored for homebrew/core formulae]' \
2021-01-24 01:59:31 -05:00
'--ignore-non-pypi-packages[Don'\''t fail if formula is not a PyPI package]' \
2024-02-29 15:14:06 -05:00
'--install-dependencies[Install missing dependencies required to update resources]' \
2021-01-24 01:59:31 -05:00
'--package-name[Use the specified package-name when finding resources for formula. If no package name is specified, it will be inferred from the formula'\''s stable URL]' \
'--print-only[Print the updated resource blocks instead of changing formula]' \
'--quiet[Make some output more quiet]' \
'--silent[Suppress any output]' \
'--verbose[Make some output more verbose]' \
'--version[Use the specified version when finding resources for formula. If no version is specified, the current version for formula will be used]' \
2021-03-14 01:39:33 +05:30
- formula \
'*::formula:__brew_formulae'
2021-01-24 01:59:31 -05:00
}
# brew update-report
2016-09-12 05:28:14 -05:00
_brew_update_report() {
2021-01-24 01:59:31 -05:00
_arguments \
2022-05-19 11:04:20 -04:00
'--auto-update[Run in '\''auto-update'\'' mode (faster, less output)]' \
2021-01-24 01:59:31 -05:00
'--debug[Display any debugging information]' \
'--force[Treat installed and updated formulae as if they are from the same taps and migrate them anyway]' \
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]'
2016-09-12 05:28:14 -05:00
}
2024-07-14 16:18:26 -04:00
# brew update-reset
_brew_update_reset() {
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
2024-07-14 23:09:53 -04:00
'--verbose[Make some output more verbose]'
2024-07-14 16:18:26 -04:00
}
2022-09-02 08:24:33 +01:00
# brew update-sponsors
_brew_update_sponsors() {
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]'
}
2021-01-24 01:59:31 -05:00
# brew update-test
2016-09-12 05:28:14 -05:00
_brew_update_test() {
_arguments \
2021-01-24 01:59:31 -05:00
'--before[Use the commit at the specified date as the start commit]' \
'--commit[Use the specified commit as the start commit]' \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--keep-tmp[Retain the temporary directory containing the new repository clone]' \
'--quiet[Make some output more quiet]' \
'--to-tag[Set `HOMEBREW_UPDATE_TO_TAG` to test updating between tags]' \
'--verbose[Make some output more verbose]'
2016-09-12 05:28:14 -05:00
}
2021-01-24 01:59:31 -05:00
# brew upgrade
2016-09-12 05:28:14 -05:00
_brew_upgrade() {
_arguments \
2021-01-27 13:45:11 +11:00
'(--formula)--appdir[Target location for Applications (default: `/Applications`)]' \
2025-03-11 10:09:23 +00:00
'(--cask)--ask[Ask for confirmation before downloading and upgrading formulae. Print bottles and dependencies download size, install and net install size]' \
2025-01-27 15:12:50 +00:00
'(--formula)--audio-unit-plugindir[Target location for Audio Unit Plugins (default: `~/Library/Audio/Plug-Ins/Components`)]' \
2021-01-27 13:45:11 +11:00
'(--formula)--binaries[Disable/enable linking of helper executables (default: enabled)]' \
'(--cask --force-bottle)--build-from-source[Compile formula from source even if a bottle is available]' \
2025-01-27 15:12:50 +00:00
'(--formula)--colorpickerdir[Target location for Color Pickers (default: `~/Library/ColorPickers`)]' \
2021-01-24 01:59:31 -05:00
'--debug[If brewing fails, open an interactive debugging session with access to IRB or a shell inside the temporary build directory]' \
2023-02-10 23:15:40 -05:00
'(--cask)--debug-symbols[Generate debug symbols on build. Source will be retained in a cache directory]' \
2025-01-27 15:12:50 +00:00
'(--formula)--dictionarydir[Target location for Dictionaries (default: `~/Library/Dictionaries`)]' \
2024-04-09 08:37:19 +00:00
'--display-times[Print install times for each package at the end of the run]' \
2021-01-24 01:59:31 -05:00
'--dry-run[Show what would be upgraded, but do not actually upgrade anything]' \
2021-01-27 13:45:11 +11:00
'(--cask)--fetch-HEAD[Fetch the upstream repository to detect if the HEAD installation of the formula is outdated. Otherwise, the repository'\''s HEAD will only be checked for updates when a new stable or development version has been released]' \
2025-01-27 15:12:50 +00:00
'(--formula)--fontdir[Target location for Fonts (default: `~/Library/Fonts`)]' \
2021-01-24 01:59:31 -05:00
'--force[Install formulae without checking for previously installed keg-only or non-migrated versions. When installing casks, overwrite existing files (binaries and symlinks are excluded, unless originally from the same cask)]' \
2021-01-27 13:45:11 +11:00
'(--cask --build-from-source)--force-bottle[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]' \
'(--formula)--greedy[Also include casks with `auto_updates true` or `version :latest`]' \
2021-08-03 07:56:05 +00:00
'(--formula)--greedy-auto-updates[Also include casks with `auto_updates true`]' \
'(--formula)--greedy-latest[Also include casks with `version :latest`]' \
2021-01-27 13:45:11 +11:00
'--help[Show this message]' \
2025-01-27 15:12:50 +00:00
'(--formula)--input-methoddir[Target location for Input Methods (default: `~/Library/Input Methods`)]' \
2021-01-27 13:45:11 +11:00
'(--cask)--interactive[Download and patch formula, then open a shell. This allows the user to run `./configure --help` and otherwise determine how to turn the software package into a Homebrew package]' \
2025-01-27 15:12:50 +00:00
'(--formula)--internet-plugindir[Target location for Internet Plugins (default: `~/Library/Internet Plug-Ins`)]' \
2021-01-27 13:45:11 +11:00
'(--cask)--keep-tmp[Retain the temporary files created during installation]' \
2023-03-27 13:56:29 +00:00
'(--formula)--keyboard-layoutdir[Target location for Keyboard Layouts (default: `/Library/Keyboard Layouts`)]' \
2021-01-27 13:45:11 +11:00
'(--formula)--language[Comma-separated list of language codes to prefer for cask installation. The first matching language is used, otherwise it reverts to the cask'\''s default language. The default value is the language of your system]' \
2025-01-27 15:12:50 +00:00
'(--formula)--mdimporterdir[Target location for Spotlight Plugins (default: `~/Library/Spotlight`)]' \
2021-01-24 01:59:31 -05:00
'--no-binaries[Disable/enable linking of helper executables (default: enabled)]' \
'--no-quarantine[Disable/enable quarantining of downloads (default: enabled)]' \
2024-03-08 08:37:50 +00:00
'(--cask)--overwrite[Delete files that already exist in the prefix while linking]' \
2025-01-27 15:12:50 +00:00
'(--formula)--prefpanedir[Target location for Preference Panes (default: `~/Library/PreferencePanes`)]' \
'(--formula)--qlplugindir[Target location for Quick Look Plugins (default: `~/Library/QuickLook`)]' \
2021-01-27 13:45:11 +11:00
'(--formula)--quarantine[Disable/enable quarantining of downloads (default: enabled)]' \
'--quiet[Make some output more quiet]' \
'(--formula)--require-sha[Require all casks to have a checksum]' \
2025-01-27 15:12:50 +00:00
'(--formula)--screen-saverdir[Target location for Screen Savers (default: `~/Library/Screen Savers`)]' \
'(--formula)--servicedir[Target location for Services (default: `~/Library/Services`)]' \
2021-01-27 13:45:11 +11:00
'(--formula)--skip-cask-deps[Skip installing cask dependencies]' \
2023-09-09 12:09:38 -04:00
'--verbose[Print the verification and post-install steps]' \
2025-01-27 15:12:50 +00:00
'(--formula)--vst-plugindir[Target location for VST Plugins (default: `~/Library/Audio/Plug-Ins/VST`)]' \
'(--formula)--vst3-plugindir[Target location for VST3 Plugins (default: `~/Library/Audio/Plug-Ins/VST3`)]' \
2024-01-24 12:23:18 -05:00
- installed_formula \
2023-03-27 13:56:29 +00:00
'(--casks --skip-cask-deps --greedy --greedy-latest --greedy-auto-updates --binaries --require-sha --quarantine --appdir --keyboard-layoutdir --colorpickerdir --prefpanedir --qlplugindir --mdimporterdir --dictionarydir --fontdir --servicedir --input-methoddir --internet-plugindir --audio-unit-plugindir --vst-plugindir --vst3-plugindir --screen-saverdir --language)--formula[Treat all named arguments as formulae. If no named arguments are specified, upgrade only outdated formulae]' \
2024-01-24 12:23:18 -05:00
'*::installed_formula:__brew_installed_formulae' \
- installed_cask \
2025-03-11 10:09:23 +00:00
'(--formulae --build-from-source --interactive --force-bottle --fetch-HEAD --keep-tmp --debug-symbols --overwrite --ask)--cask[Treat all named arguments as casks. If no named arguments are specified, upgrade only outdated casks]' \
2024-01-24 12:23:18 -05:00
'*::installed_cask:__brew_installed_casks'
2021-01-24 01:59:31 -05:00
}
# brew uses
2016-09-12 05:28:14 -05:00
_brew_uses() {
_arguments \
2021-01-27 13:45:11 +11:00
'(--formula)--cask[Include only casks]' \
2021-01-24 01:59:31 -05:00
'--debug[Display any debugging information]' \
2022-09-05 13:57:22 +01:00
'--eval-all[Evaluate all available formulae and casks, whether installed or not, to show their dependents]' \
2021-01-24 01:59:31 -05:00
'--help[Show this message]' \
2023-08-28 22:14:26 -07:00
'--include-build[Include formulae that specify formula as a `:build` dependency]' \
2025-02-03 17:40:17 +01:00
'--include-implicit[Include formulae that have formula as an implicit dependency for downloading and unpacking source files]' \
2023-08-28 22:14:26 -07:00
'--include-optional[Include formulae that specify formula as an `:optional` dependency]' \
'--include-test[Include formulae that specify formula as a `:test` dependency]' \
2023-05-18 14:09:30 +00:00
'(--all --missing)--installed[Only list formulae and casks that are currently installed]' \
'(--installed)--missing[Only list formulae and casks that are not currently installed]' \
2021-01-24 01:59:31 -05:00
'--quiet[Make some output more quiet]' \
'--recursive[Resolve more than one level of dependencies]' \
2023-08-28 22:14:26 -07:00
'--skip-recommended[Skip all formulae that specify formula as a `:recommended` dependency]' \
2021-01-24 01:59:31 -05:00
'--verbose[Make some output more verbose]' \
2021-03-14 01:39:33 +05:30
- formula \
'(--cask)--formula[Include only formulae]' \
'*::formula:__brew_formulae'
2021-01-24 01:59:31 -05:00
}
# brew vendor-gems
_brew_vendor_gems() {
2016-09-12 05:28:14 -05:00
_arguments \
2021-01-24 01:59:31 -05:00
'--debug[Display any debugging information]' \
'--help[Show this message]' \
2022-10-08 18:39:47 +01:00
'--no-commit[Do not generate a new commit upon completion]' \
2021-01-24 01:59:31 -05:00
'--quiet[Make some output more quiet]' \
2023-02-10 23:15:40 -05:00
'--update[Update the specified list of vendored gems to the latest version]' \
2021-01-24 01:59:31 -05:00
'--verbose[Make some output more verbose]'
2016-09-12 05:28:14 -05:00
}
2024-07-14 16:18:26 -04:00
# brew vendor-install
_brew_vendor_install() {
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]'
}
2025-02-04 15:38:49 +00:00
# brew verify
_brew_verify() {
_arguments \
'(--bottle-tag)--arch[Download for the given CPU architecture.(Pass `all` to download for all architectures.)]' \
'(--os --arch)--bottle-tag[Download a bottle for given tag]' \
'--debug[Display any debugging information]' \
'--deps[Also download dependencies for any listed formula]' \
'--force[Remove a previously cached version and re-fetch]' \
'--help[Show this message]' \
'--json[Return JSON for the attestation data for each bottle]' \
'(--bottle-tag)--os[Download for the given operating system.(Pass `all` to download for all operating systems.)]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]' \
- formula \
'*::formula:__brew_formulae'
}
2021-01-24 01:59:31 -05:00
# The main completion function
2016-09-12 05:28:14 -05:00
_brew() {
local curcontext="$curcontext" state state_descr line expl
2019-03-05 10:57:19 -06:00
local tmp ret=1
2016-09-12 05:28:14 -05:00
_arguments -C : \
'(-v)-v[verbose]' \
'1:command:->command' \
'*::options:->options' && return 0
case "$state" in
2019-03-05 10:57:19 -06:00
command)
# set default cache policy
2020-06-17 23:02:46 +03:00
zstyle -s ":completion:${curcontext%:*}:*" cache-policy tmp ||
zstyle ":completion:${curcontext%:*}:*" cache-policy __brew_completion_caching_policy
zstyle -s ":completion:${curcontext%:*}:*" use-cache tmp ||
zstyle ":completion:${curcontext%:*}:*" use-cache true
2019-03-05 10:57:19 -06:00
__brew_commands && return 0
;;
2016-09-12 05:28:14 -05:00
options)
local command_or_alias command
local -A aliases
# expand alias e.g. ls -> list
command_or_alias="${line[1]}"
aliases=($(__brew_list_aliases))
command="${aliases[$command_or_alias]:-$command_or_alias}"
# change context to e.g. brew-list
2019-03-05 10:57:19 -06:00
curcontext="${curcontext%:*}-${command}:${curcontext##*:}"
# set default cache policy (we repeat this dance because the context
# service differs from above)
2020-06-17 23:02:46 +03:00
zstyle -s ":completion:${curcontext%:*}:*" cache-policy tmp ||
zstyle ":completion:${curcontext%:*}:*" cache-policy __brew_completion_caching_policy
zstyle -s ":completion:${curcontext%:*}:*" use-cache tmp ||
zstyle ":completion:${curcontext%:*}:*" use-cache true
2016-09-12 05:28:14 -05:00
# call completion for named command e.g. _brew_list
local completion_func="_brew_${command//-/_}"
_call_function ret "${completion_func}" && return ret
_message "a completion function is not defined for command or alias: ${command_or_alias}"
return 1
;;
esac
}
_brew "$@"