Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Library/Homebrew/brew.sh
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,10 @@ case "$@" in
echo "${HOMEBREW_CACHE}"
exit 0
;;
--taps)
source "${HOMEBREW_LIBRARY}/Homebrew/cmd/--taps.sh"
homebrew---taps "$@" && exit 0
;;
# falls back to cmd/--prefix.rb and cmd/--cellar.rb on a non-zero return
--prefix* | --cellar*)
source "${HOMEBREW_LIBRARY}/Homebrew/formula_path.sh"
Expand Down
22 changes: 22 additions & 0 deletions Library/Homebrew/cmd/--taps.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# typed: strict
# frozen_string_literal: true

require "abstract_command"
require "shell_command"

module Homebrew
module Cmd
class Taps < AbstractCommand
include ShellCommand

sig { override.returns(String) }
def self.command_name = "--taps"

cmd_args do
description <<~EOS
Display the path to Homebrew’s Taps directory.
EOS
end
end
end
end
8 changes: 8 additions & 0 deletions Library/Homebrew/cmd/--taps.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Documentation defined in Library/Homebrew/cmd/--taps.rb

# HOMEBREW_LIBRARY is set by brew.sh
# shellcheck disable=SC2154

homebrew---taps() {
echo "${HOMEBREW_LIBRARY}/Taps"
}
13 changes: 13 additions & 0 deletions Library/Homebrew/sorbet/rbi/dsl/homebrew/cmd/taps.rbi

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions completions/bash/brew
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,22 @@ _brew___repository() {
__brew_complete_tapped
}

_brew___taps() {
local cur="${COMP_WORDS[COMP_CWORD]}"
case "${cur}" in
-*)
__brewcomp "
--debug
--help
--quiet
--verbose
"
return
;;
*) ;;
esac
}

_brew___version() {
local cur="${COMP_WORDS[COMP_CWORD]}"
case "${cur}" in
Expand Down Expand Up @@ -3300,6 +3316,7 @@ _brew() {
--prefix) _brew___prefix ;;
--repo) _brew___repo ;;
--repository) _brew___repository ;;
--taps) _brew___taps ;;
--version) _brew___version ;;
-S) _brew__s ;;
-v) _brew__v ;;
Expand Down
7 changes: 7 additions & 0 deletions completions/fish/brew.fish
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,13 @@ __fish_brew_complete_arg '--repository' -l verbose -d 'Make some output more ver
__fish_brew_complete_arg '--repository' -a '(__fish_brew_suggest_taps_installed)'


__fish_brew_complete_cmd '--taps' 'Display the path to Homebrew’s Taps directory'
__fish_brew_complete_arg '--taps' -l debug -d 'Display any debugging information'
__fish_brew_complete_arg '--taps' -l help -d 'Show this message'
__fish_brew_complete_arg '--taps' -l quiet -d 'Make some output more quiet'
__fish_brew_complete_arg '--taps' -l verbose -d 'Make some output more verbose'


__fish_brew_complete_cmd '--version' 'Print the version numbers of Homebrew, Homebrew/homebrew-core and Homebrew/homebrew-cask (if tapped) to standard output'
__fish_brew_complete_arg '--version' -l debug -d 'Display any debugging information'
__fish_brew_complete_arg '--version' -l help -d 'Show this message'
Expand Down
1 change: 1 addition & 0 deletions completions/internal_commands_list.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
--prefix
--repo
--repository
--taps
--version
-S
-v
Expand Down
10 changes: 10 additions & 0 deletions completions/zsh/_brew
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ __brew_internal_commands() {
'--env:Summarise Homebrew'\''s build environment as a plain list'
'--prefix:Display Homebrew'\''s install path'
'--repository:Display where Homebrew'\''s Git repository is located'
'--taps:Display the path to Homebrew’s Taps directory'
'--version:Print the version numbers of Homebrew, Homebrew/homebrew-core and Homebrew/homebrew-cask (if tapped) to standard output'
'alias:Show an alias'\''s command'
'analytics:Control Homebrew'\''s anonymous aggregate user behaviour analytics'
Expand Down Expand Up @@ -380,6 +381,15 @@ _brew___repository() {
'*:tap:__brew_any_tap'
}

# brew --taps
_brew___taps() {
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]'
}

# brew --version
_brew___version() {
_arguments \
Expand Down
4 changes: 4 additions & 0 deletions docs/Manpage.md
Original file line number Diff line number Diff line change
Expand Up @@ -1953,6 +1953,10 @@ Display where Homebrew's Git repository is located.
If *`user`*`/`*`repo`* are provided, display where tap *`user`*`/`*`repo`*'s
directory is located.

### `--taps`

Display the path to Homebrew’s Taps directory.

### `--version`, `-v`

Print the version numbers of Homebrew, Homebrew/homebrew-core and
Expand Down
2 changes: 2 additions & 0 deletions manpages/brew.1
Original file line number Diff line number Diff line change
Expand Up @@ -1215,6 +1215,8 @@ Outputs nothing and returns a failing status code if \fIformula\fP is not instal
Display where Homebrew\[u2019]s Git repository is located\.
.P
If \fIuser\fP\fB/\fP\fIrepo\fP are provided, display where tap \fIuser\fP\fB/\fP\fIrepo\fP\[u2019]s directory is located\.
.SS "\fB\-\-taps\fP"
Display the path to Homebrew’s Taps directory\.
.SS "\fB\-\-version\fP, \fB\-v\fP"
Print the version numbers of Homebrew, Homebrew/homebrew\-core and Homebrew/homebrew\-cask (if tapped) to standard output\.
.SH "DEVELOPER COMMANDS"
Expand Down
Loading