diff --git a/completions/bash/brew b/completions/bash/brew index 457a51ca74..448c975359 100644 --- a/completions/bash/brew +++ b/completions/bash/brew @@ -1099,6 +1099,7 @@ _brew_instal() { -*) __brewcomp " --HEAD + --adopt --appdir --audio-unit-plugindir --binaries @@ -1159,6 +1160,7 @@ _brew_install() { -*) __brewcomp " --HEAD + --adopt --appdir --audio-unit-plugindir --binaries @@ -1727,6 +1729,7 @@ _brew_reinstall() { case "${cur}" in -*) __brewcomp " + --adopt --appdir --audio-unit-plugindir --binaries diff --git a/completions/fish/brew.fish b/completions/fish/brew.fish index ad8341c2fe..e2b781fa0b 100644 --- a/completions/fish/brew.fish +++ b/completions/fish/brew.fish @@ -785,6 +785,7 @@ __fish_brew_complete_arg 'info; and not __fish_seen_argument -l formula -l formu __fish_brew_complete_cmd 'instal' 'Install a formula or cask' __fish_brew_complete_arg 'instal' -l HEAD -d 'If formula defines it, install the HEAD version, aka. main, trunk, unstable, master' +__fish_brew_complete_arg 'instal' -l adopt -d 'Adopt existing artifacts in the destination that are identical to those being installed. Cannot be combined with --force' __fish_brew_complete_arg 'instal' -l appdir -d 'Target location for Applications (default: `/Applications`)' __fish_brew_complete_arg 'instal' -l audio-unit-plugindir -d 'Target location for Audio Unit Plugins (default: `~/Library/Audio/Plug-Ins/Components`)' __fish_brew_complete_arg 'instal' -l binaries -d 'Disable/enable linking of helper executables (default: enabled)' @@ -836,6 +837,7 @@ __fish_brew_complete_arg 'instal; and not __fish_seen_argument -l formula -l for __fish_brew_complete_cmd 'install' 'Install a formula or cask' __fish_brew_complete_arg 'install' -l HEAD -d 'If formula defines it, install the HEAD version, aka. main, trunk, unstable, master' +__fish_brew_complete_arg 'install' -l adopt -d 'Adopt existing artifacts in the destination that are identical to those being installed. Cannot be combined with --force' __fish_brew_complete_arg 'install' -l appdir -d 'Target location for Applications (default: `/Applications`)' __fish_brew_complete_arg 'install' -l audio-unit-plugindir -d 'Target location for Audio Unit Plugins (default: `~/Library/Audio/Plug-Ins/Components`)' __fish_brew_complete_arg 'install' -l binaries -d 'Disable/enable linking of helper executables (default: enabled)' @@ -1188,6 +1190,7 @@ __fish_brew_complete_arg 'readall' -a '(__fish_brew_suggest_taps_installed)' __fish_brew_complete_cmd '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' +__fish_brew_complete_arg 'reinstall' -l adopt -d 'Adopt existing artifacts in the destination that are identical to those being installed. Cannot be combined with --force' __fish_brew_complete_arg 'reinstall' -l appdir -d 'Target location for Applications (default: `/Applications`)' __fish_brew_complete_arg 'reinstall' -l audio-unit-plugindir -d 'Target location for Audio Unit Plugins (default: `~/Library/Audio/Plug-Ins/Components`)' __fish_brew_complete_arg 'reinstall' -l binaries -d 'Disable/enable linking of helper executables (default: enabled)' diff --git a/completions/zsh/_brew b/completions/zsh/_brew index cf07188939..57ced64ab2 100644 --- a/completions/zsh/_brew +++ b/completions/zsh/_brew @@ -971,6 +971,7 @@ _brew_info() { _brew_instal() { _arguments \ '(--cask)--HEAD[If formula defines it, install the HEAD version, aka. main, trunk, unstable, master]' \ + '(--formula --force)--adopt[Adopt existing artifacts in the destination that are identical to those being installed. Cannot be combined with --force]' \ '(--formula)--appdir[Target location for Applications (default: `/Applications`)]' \ '(--formula)--audio-unit-plugindir[Target location for Audio Unit Plugins (default: `~/Library/Audio/Plug-Ins/Components`)]' \ '(--formula)--binaries[Disable/enable linking of helper executables (default: enabled)]' \ @@ -986,7 +987,7 @@ _brew_instal() { '--dry-run[Show what would be installed, but do not actually install anything]' \ '(--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]' \ '(--formula)--fontdir[Target location for Fonts (default: `~/Library/Fonts`)]' \ - '--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)]' \ + '(--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)]' \ '(--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]' \ @@ -1015,7 +1016,7 @@ _brew_instal() { '(--formula)--vst3-plugindir[Target location for VST3 Plugins (default: `~/Library/Audio/Plug-Ins/VST3`)]' \ '(--formula)--zap[For use with `brew reinstall --cask`. Remove all files associated with a cask. *May remove files which are shared between applications.*]' \ - formula \ - '(--casks --binaries --require-sha --quarantine --skip-cask-deps --zap --appdir --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]' \ + '(--casks --binaries --require-sha --quarantine --adopt --skip-cask-deps --zap --appdir --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]' \ '*::formula:__brew_formulae' \ - cask \ '(--formulae --env --ignore-dependencies --only-dependencies --cc --build-from-source --force-bottle --include-test --HEAD --fetch-HEAD --keep-tmp --debug-symbols --build-bottle --bottle-arch --display-times --interactive --git --overwrite)--cask[Treat all named arguments as casks]' \ @@ -1026,6 +1027,7 @@ _brew_instal() { _brew_install() { _arguments \ '(--cask)--HEAD[If formula defines it, install the HEAD version, aka. main, trunk, unstable, master]' \ + '(--formula --force)--adopt[Adopt existing artifacts in the destination that are identical to those being installed. Cannot be combined with --force]' \ '(--formula)--appdir[Target location for Applications (default: `/Applications`)]' \ '(--formula)--audio-unit-plugindir[Target location for Audio Unit Plugins (default: `~/Library/Audio/Plug-Ins/Components`)]' \ '(--formula)--binaries[Disable/enable linking of helper executables (default: enabled)]' \ @@ -1041,7 +1043,7 @@ _brew_install() { '--dry-run[Show what would be installed, but do not actually install anything]' \ '(--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]' \ '(--formula)--fontdir[Target location for Fonts (default: `~/Library/Fonts`)]' \ - '--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)]' \ + '(--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)]' \ '(--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]' \ @@ -1070,7 +1072,7 @@ _brew_install() { '(--formula)--vst3-plugindir[Target location for VST3 Plugins (default: `~/Library/Audio/Plug-Ins/VST3`)]' \ '(--formula)--zap[For use with `brew reinstall --cask`. Remove all files associated with a cask. *May remove files which are shared between applications.*]' \ - formula \ - '(--casks --binaries --require-sha --quarantine --skip-cask-deps --zap --appdir --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]' \ + '(--casks --binaries --require-sha --quarantine --adopt --skip-cask-deps --zap --appdir --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]' \ '*::formula:__brew_formulae' \ - cask \ '(--formulae --env --ignore-dependencies --only-dependencies --cc --build-from-source --force-bottle --include-test --HEAD --fetch-HEAD --keep-tmp --debug-symbols --build-bottle --bottle-arch --display-times --interactive --git --overwrite)--cask[Treat all named arguments as casks]' \ @@ -1450,6 +1452,7 @@ _brew_readall() { # brew reinstall _brew_reinstall() { _arguments \ + '(--formula)--adopt[Adopt existing artifacts in the destination that are identical to those being installed. Cannot be combined with --force]' \ '(--formula)--appdir[Target location for Applications (default: `/Applications`)]' \ '(--formula)--audio-unit-plugindir[Target location for Audio Unit Plugins (default: `~/Library/Audio/Plug-Ins/Components`)]' \ '(--formula)--binaries[Disable/enable linking of helper executables (default: enabled)]' \ @@ -1485,7 +1488,7 @@ _brew_reinstall() { '(--formula)--vst3-plugindir[Target location for VST3 Plugins (default: `~/Library/Audio/Plug-Ins/VST3`)]' \ '(--formula)--zap[For use with `brew reinstall --cask`. Remove all files associated with a cask. *May remove files which are shared between applications.*]' \ - formula \ - '(--casks --binaries --require-sha --quarantine --skip-cask-deps --zap --appdir --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]' \ + '(--casks --binaries --require-sha --quarantine --adopt --skip-cask-deps --zap --appdir --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]' \ '*::formula:__brew_formulae' \ - cask \ '(--formulae --build-from-source --interactive --force-bottle --keep-tmp --debug-symbols --display-times --git)--cask[Treat all named arguments as casks]' \ diff --git a/docs/Manpage.md b/docs/Manpage.md index 9d612d6556..f0ea1f962c 100644 --- a/docs/Manpage.md +++ b/docs/Manpage.md @@ -373,6 +373,8 @@ is already installed but outdated. Require all casks to have a checksum. * `--[no-]quarantine`: Disable/enable quarantining of downloads (default: enabled). +* `--adopt`: + Adopt existing artifacts in the destination that are identical to those being installed. Cannot be combined with --force. * `--skip-cask-deps`: Skip installing cask dependencies. * `--zap`: @@ -572,6 +574,8 @@ reinstalled formulae or, every 30 days, for all formulae. Require all casks to have a checksum. * `--[no-]quarantine`: Disable/enable quarantining of downloads (default: enabled). +* `--adopt`: + Adopt existing artifacts in the destination that are identical to those being installed. Cannot be combined with --force. * `--skip-cask-deps`: Skip installing cask dependencies. * `--zap`: diff --git a/manpages/brew.1 b/manpages/brew.1 index 029b72fb91..bdaceab3e1 100644 --- a/manpages/brew.1 +++ b/manpages/brew.1 @@ -520,6 +520,10 @@ Require all casks to have a checksum\. Disable/enable quarantining of downloads (default: enabled)\. . .TP +\fB\-\-adopt\fR +Adopt existing artifacts in the destination that are identical to those being installed\. Cannot be combined with \-\-force\. +. +.TP \fB\-\-skip\-cask\-deps\fR Skip installing cask dependencies\. . @@ -805,6 +809,10 @@ Require all casks to have a checksum\. Disable/enable quarantining of downloads (default: enabled)\. . .TP +\fB\-\-adopt\fR +Adopt existing artifacts in the destination that are identical to those being installed\. Cannot be combined with \-\-force\. +. +.TP \fB\-\-skip\-cask\-deps\fR Skip installing cask dependencies\. .