Skip to content

Commit

Permalink
Merge pull request #17693 from Homebrew/sponsors-maintainers-man-comp…
Browse files Browse the repository at this point in the history
…letions

Update manpage and completions.
  • Loading branch information
ZhongRuoyu authored Jul 13, 2024
2 parents f39b5c1 + ff02bc4 commit 5758840
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 18 deletions.
5 changes: 4 additions & 1 deletion completions/bash/brew
Original file line number Diff line number Diff line change
Expand Up @@ -2113,7 +2113,9 @@ _brew_tab() {
case "${cur}" in
-*)
__brewcomp "
--cask
--debug
--formula
--help
--installed-on-request
--no-installed-on-request
Expand All @@ -2124,7 +2126,8 @@ _brew_tab() {
;;
*) ;;
esac
__brew_complete_formulae
__brew_complete_installed_formulae
__brew_complete_installed_casks
}

_brew_tap() {
Expand Down
11 changes: 7 additions & 4 deletions completions/fish/brew.fish
Original file line number Diff line number Diff line change
Expand Up @@ -1414,14 +1414,17 @@ __fish_brew_complete_arg 'style; and not __fish_seen_argument -l cask -l casks'
__fish_brew_complete_arg 'style; and not __fish_seen_argument -l formula -l formulae' -a '(__fish_brew_suggest_casks_all)'


__fish_brew_complete_cmd 'tab' 'Edit tab information for installed formulae'
__fish_brew_complete_cmd 'tab' 'Edit tab information for installed formulae or casks'
__fish_brew_complete_arg 'tab' -l cask -d 'Only mark casks'
__fish_brew_complete_arg 'tab' -l debug -d 'Display any debugging information'
__fish_brew_complete_arg 'tab' -l formula -d 'Only mark formulae'
__fish_brew_complete_arg 'tab' -l help -d 'Show this message'
__fish_brew_complete_arg 'tab' -l installed-on-request -d 'Mark formula as installed on request'
__fish_brew_complete_arg 'tab' -l no-installed-on-request -d 'Mark formula as not installed on request'
__fish_brew_complete_arg 'tab' -l installed-on-request -d 'Mark installed_formula or installed_cask as installed on request'
__fish_brew_complete_arg 'tab' -l no-installed-on-request -d 'Mark installed_formula or installed_cask as not installed on request'
__fish_brew_complete_arg 'tab' -l quiet -d 'Make some output more quiet'
__fish_brew_complete_arg 'tab' -l verbose -d 'Make some output more verbose'
__fish_brew_complete_arg 'tab' -a '(__fish_brew_suggest_formulae_all)'
__fish_brew_complete_arg 'tab; and not __fish_seen_argument -l cask -l casks' -a '(__fish_brew_suggest_formulae_installed)'
__fish_brew_complete_arg 'tab; and not __fish_seen_argument -l formula -l formulae' -a '(__fish_brew_suggest_casks_installed)'


__fish_brew_complete_cmd 'tap' 'Tap a formula repository'
Expand Down
14 changes: 9 additions & 5 deletions completions/zsh/_brew
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ __brew_internal_commands() {
'sh:Enter an interactive shell for Homebrew'\''s build environment'
'shellenv:Print export statements'
'style:Check formulae or files for conformance to Homebrew style guidelines'
'tab:Edit tab information for installed formulae'
'tab:Edit tab information for installed formulae or casks'
'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'
Expand Down Expand Up @@ -1754,12 +1754,16 @@ _brew_tab() {
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'(--no-installed-on-request)--installed-on-request[Mark formula as installed on request]' \
'(--installed-on-request)--no-installed-on-request[Mark formula as not installed on request]' \
'(--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]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]' \
- formula \
'*::formula:__brew_formulae'
- installed_formula \
'(--cask)--formula[Only mark formulae]' \
'*::installed_formula:__brew_installed_formulae' \
- installed_cask \
'(--formula)--cask[Only mark casks]' \
'*::installed_cask:__brew_installed_casks'
}

# brew tap
Expand Down
16 changes: 12 additions & 4 deletions docs/Manpage.md
Original file line number Diff line number Diff line change
Expand Up @@ -1162,9 +1162,9 @@ evaluation of this command's output to your dotfiles (e.g. `~/.bash_profile` or
The shell can be specified explicitly with a supported shell name parameter.
Unknown shells will output POSIX exports.

### `tab` \[`--installed-on-request`\] \[`--no-installed-on-request`\] *`formula`* \[...\]
### `tab` \[*`options`*\] *`installed_formula`*\|*`installed_cask`* \[...\]

Edit tab information for installed formulae.
Edit tab information for installed formulae or casks.

This can be useful when you want to control whether an installed formula should
be removed by `brew autoremove`. To prevent removal, mark the formula as
Expand All @@ -1173,11 +1173,19 @@ request.

`--installed-on-request`

: Mark *`formula`* as installed on request.
: Mark *`installed_formula`* or *`installed_cask`* as installed on request.

`--no-installed-on-request`

: Mark *`formula`* as not installed on request.
: Mark *`installed_formula`* or *`installed_cask`* as not installed on request.

`--formula`

: Only mark formulae.

`--cask`

: Only mark casks.

### `tap` \[*`options`*\] \[*`user`*`/`*`repo`*\] \[*`URL`*\]

Expand Down
14 changes: 10 additions & 4 deletions manpages/brew.1
Original file line number Diff line number Diff line change
Expand Up @@ -727,16 +727,22 @@ Print export statements\. When run in a shell, this installation of Homebrew wil
The variables \fBHOMEBREW_PREFIX\fP, \fBHOMEBREW_CELLAR\fP and \fBHOMEBREW_REPOSITORY\fP are also exported to avoid querying them multiple times\. To help guarantee idempotence, this command produces no output when Homebrew\[u2019]s \fBbin\fP and \fBsbin\fP directories are first and second respectively in your \fBPATH\fP\&\. Consider adding evaluation of this command\[u2019]s output to your dotfiles (e\.g\. \fB~/\.bash_profile\fP or \fB~/\.zprofile\fP on macOS and \fB~/\.bashrc\fP or \fB~/\.zshrc\fP on Linux) with: \fBeval "$(brew shellenv)"\fP
.P
The shell can be specified explicitly with a supported shell name parameter\. Unknown shells will output POSIX exports\.
.SS "\fBtab\fP \fR[\fB\-\-installed\-on\-request\fP] \fR[\fB\-\-no\-installed\-on\-request\fP] \fIformula\fP \fR[\.\.\.]"
Edit tab information for installed formulae\.
.SS "\fBtab\fP \fR[\fIoptions\fP] \fIinstalled_formula\fP|\fIinstalled_cask\fP \fR[\.\.\.]"
Edit tab information for installed formulae or casks\.
.P
This can be useful when you want to control whether an installed formula should be removed by \fBbrew autoremove\fP\&\. To prevent removal, mark the formula as installed on request; to allow removal, mark the formula as not installed on request\.
.TP
\fB\-\-installed\-on\-request\fP
Mark \fIformula\fP as installed on request\.
Mark \fIinstalled_formula\fP or \fIinstalled_cask\fP as installed on request\.
.TP
\fB\-\-no\-installed\-on\-request\fP
Mark \fIformula\fP as not installed on request\.
Mark \fIinstalled_formula\fP or \fIinstalled_cask\fP as not installed on request\.
.TP
\fB\-\-formula\fP
Only mark formulae\.
.TP
\fB\-\-cask\fP
Only mark casks\.
.SS "\fBtap\fP \fR[\fIoptions\fP] \fR[\fIuser\fP\fB/\fP\fIrepo\fP] \fR[\fIURL\fP]"
Tap a formula repository\. If no arguments are provided, list all installed taps\.
.P
Expand Down

0 comments on commit 5758840

Please sign in to comment.