Skip to content

Commit 05bf748

Browse files
committed
Fix shellcheck, add manpage + completions
Signed-off-by: Patrick Linnane <[email protected]>
1 parent 5366d2d commit 05bf748

File tree

7 files changed

+44
-0
lines changed

7 files changed

+44
-0
lines changed

Library/Homebrew/cmd/--taps.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Documentation defined in Library/Homebrew/cmd/--taps.rb
22

3+
# HOMEBREW_LIBRARY is set by brew.sh
4+
# shellcheck disable=SC2154
5+
36
homebrew---taps() {
47
echo "${HOMEBREW_LIBRARY}/Taps"
58
}

completions/bash/brew

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,22 @@ _brew___repository() {
289289
__brew_complete_tapped
290290
}
291291

292+
_brew___taps() {
293+
local cur="${COMP_WORDS[COMP_CWORD]}"
294+
case "${cur}" in
295+
-*)
296+
__brewcomp "
297+
--debug
298+
--help
299+
--quiet
300+
--verbose
301+
"
302+
return
303+
;;
304+
*) ;;
305+
esac
306+
}
307+
292308
_brew___version() {
293309
local cur="${COMP_WORDS[COMP_CWORD]}"
294310
case "${cur}" in
@@ -3300,6 +3316,7 @@ _brew() {
33003316
--prefix) _brew___prefix ;;
33013317
--repo) _brew___repo ;;
33023318
--repository) _brew___repository ;;
3319+
--taps) _brew___taps ;;
33033320
--version) _brew___version ;;
33043321
-S) _brew__s ;;
33053322
-v) _brew__v ;;

completions/fish/brew.fish

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,13 @@ __fish_brew_complete_arg '--repository' -l verbose -d 'Make some output more ver
263263
__fish_brew_complete_arg '--repository' -a '(__fish_brew_suggest_taps_installed)'
264264

265265

266+
__fish_brew_complete_cmd '--taps' 'Display the path to Homebrew’s Taps directory'
267+
__fish_brew_complete_arg '--taps' -l debug -d 'Display any debugging information'
268+
__fish_brew_complete_arg '--taps' -l help -d 'Show this message'
269+
__fish_brew_complete_arg '--taps' -l quiet -d 'Make some output more quiet'
270+
__fish_brew_complete_arg '--taps' -l verbose -d 'Make some output more verbose'
271+
272+
266273
__fish_brew_complete_cmd '--version' 'Print the version numbers of Homebrew, Homebrew/homebrew-core and Homebrew/homebrew-cask (if tapped) to standard output'
267274
__fish_brew_complete_arg '--version' -l debug -d 'Display any debugging information'
268275
__fish_brew_complete_arg '--version' -l help -d 'Show this message'

completions/internal_commands_list.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
--prefix
77
--repo
88
--repository
9+
--taps
910
--version
1011
-S
1112
-v

completions/zsh/_brew

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ __brew_internal_commands() {
138138
'--env:Summarise Homebrew'\''s build environment as a plain list'
139139
'--prefix:Display Homebrew'\''s install path'
140140
'--repository:Display where Homebrew'\''s Git repository is located'
141+
'--taps:Display the path to Homebrew’s Taps directory'
141142
'--version:Print the version numbers of Homebrew, Homebrew/homebrew-core and Homebrew/homebrew-cask (if tapped) to standard output'
142143
'alias:Show an alias'\''s command'
143144
'analytics:Control Homebrew'\''s anonymous aggregate user behaviour analytics'
@@ -380,6 +381,15 @@ _brew___repository() {
380381
'*:tap:__brew_any_tap'
381382
}
382383

384+
# brew --taps
385+
_brew___taps() {
386+
_arguments \
387+
'--debug[Display any debugging information]' \
388+
'--help[Show this message]' \
389+
'--quiet[Make some output more quiet]' \
390+
'--verbose[Make some output more verbose]'
391+
}
392+
383393
# brew --version
384394
_brew___version() {
385395
_arguments \

docs/Manpage.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1953,6 +1953,10 @@ Display where Homebrew's Git repository is located.
19531953
If *`user`*`/`*`repo`* are provided, display where tap *`user`*`/`*`repo`*'s
19541954
directory is located.
19551955

1956+
### `--taps`
1957+
1958+
Display the path to Homebrew’s Taps directory.
1959+
19561960
### `--version`, `-v`
19571961

19581962
Print the version numbers of Homebrew, Homebrew/homebrew-core and

manpages/brew.1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1215,6 +1215,8 @@ Outputs nothing and returns a failing status code if \fIformula\fP is not instal
12151215
Display where Homebrew\[u2019]s Git repository is located\.
12161216
.P
12171217
If \fIuser\fP\fB/\fP\fIrepo\fP are provided, display where tap \fIuser\fP\fB/\fP\fIrepo\fP\[u2019]s directory is located\.
1218+
.SS "\fB\-\-taps\fP"
1219+
Display the path to Homebrew’s Taps directory\.
12181220
.SS "\fB\-\-version\fP, \fB\-v\fP"
12191221
Print the version numbers of Homebrew, Homebrew/homebrew\-core and Homebrew/homebrew\-cask (if tapped) to standard output\.
12201222
.SH "DEVELOPER COMMANDS"

0 commit comments

Comments
 (0)