From a90fb27adb42655191b90fdc42acae364fde81de Mon Sep 17 00:00:00 2001 From: Dawid Dziurla Date: Thu, 4 Feb 2021 18:36:32 +0100 Subject: [PATCH] untap: add missing --force switch --- Library/Homebrew/cmd/untap.rb | 2 ++ completions/bash/brew | 1 + completions/fish/brew.fish | 1 + completions/zsh/_brew | 1 + docs/Manpage.md | 5 ++++- manpages/brew.1 | 6 +++++- 6 files changed, 14 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/cmd/untap.rb b/Library/Homebrew/cmd/untap.rb index 33f56c4ba8..888d768e47 100644 --- a/Library/Homebrew/cmd/untap.rb +++ b/Library/Homebrew/cmd/untap.rb @@ -14,6 +14,8 @@ module Homebrew description <<~EOS Remove a tapped formula repository. EOS + switch "-f", "--force", + description: "Untap even if formulae or casks from this tap are currently installed." named_args :tap, min: 1 end diff --git a/completions/bash/brew b/completions/bash/brew index 9ea9ef0932..71098288b9 100644 --- a/completions/bash/brew +++ b/completions/bash/brew @@ -2047,6 +2047,7 @@ _brew_untap() { -*) __brewcomp " --debug + --force --help --quiet --verbose diff --git a/completions/fish/brew.fish b/completions/fish/brew.fish index 680a138e54..8ff4e3174e 100644 --- a/completions/fish/brew.fish +++ b/completions/fish/brew.fish @@ -1406,6 +1406,7 @@ __fish_brew_complete_arg 'unpin' -a '(__fish_brew_suggest_formulae_installed)' __fish_brew_complete_cmd 'untap' 'Remove a tapped formula repository' __fish_brew_complete_arg 'untap' -l debug -d 'Display any debugging information' +__fish_brew_complete_arg 'untap' -l force -d 'Untap even if formulae or casks from this tap are currently installed' __fish_brew_complete_arg 'untap' -l help -d 'Show this message' __fish_brew_complete_arg 'untap' -l quiet -d 'Make some output more quiet' __fish_brew_complete_arg 'untap' -l verbose -d 'Make some output more verbose' diff --git a/completions/zsh/_brew b/completions/zsh/_brew index 1b020e171f..7792c24eed 100644 --- a/completions/zsh/_brew +++ b/completions/zsh/_brew @@ -1638,6 +1638,7 @@ _brew_unpin() { _brew_untap() { _arguments \ '--debug[Display any debugging information]' \ + '--force[Untap even if formulae or casks from this tap are currently installed]' \ '--help[Show this message]' \ '--quiet[Make some output more quiet]' \ '--verbose[Make some output more verbose]' \ diff --git a/docs/Manpage.md b/docs/Manpage.md index 5952adac90..2581d00e34 100644 --- a/docs/Manpage.md +++ b/docs/Manpage.md @@ -590,10 +590,13 @@ for temporarily disabling a formula: Unpin *`formula`*, allowing them to be upgraded by `brew upgrade` *`formula`*. See also `pin`. -### `untap` *`tap`* [...] +### `untap` [*`--force`*] *`tap`* [...] Remove a tapped formula repository. +* `-f`, `--force`: + Untap even if formulae or casks from this tap are currently installed. + ### `update` [*`options`*] Fetch the newest version of Homebrew and all formulae from GitHub using `git`(1) and perform any necessary migrations. diff --git a/manpages/brew.1 b/manpages/brew.1 index edcc929dd2..81c06baee8 100644 --- a/manpages/brew.1 +++ b/manpages/brew.1 @@ -793,9 +793,13 @@ List files which would be unlinked without actually unlinking or deleting any fi .SS "\fBunpin\fR \fIinstalled_formula\fR [\.\.\.]" Unpin \fIformula\fR, allowing them to be upgraded by \fBbrew upgrade\fR \fIformula\fR\. See also \fBpin\fR\. . -.SS "\fBuntap\fR \fItap\fR [\.\.\.]" +.SS "\fBuntap\fR [\fI\-\-force\fR] \fItap\fR [\.\.\.]" Remove a tapped formula repository\. . +.TP +\fB\-f\fR, \fB\-\-force\fR +Untap even if formulae or casks from this tap are currently installed\. +. .SS "\fBupdate\fR [\fIoptions\fR]" Fetch the newest version of Homebrew and all formulae from GitHub using \fBgit\fR(1) and perform any necessary migrations\. .