Skip to content
Snippets Groups Projects
Commit ae829ed2 authored by Timothee Cour's avatar Timothee Cour
Browse files

add brew where command

parent cf18a999
No related branches found
No related tags found
No related merge requests found
......@@ -15,7 +15,7 @@ Troubleshooting:
Developers:
brew create [URL [--no-fetch]]
brew edit [FORMULA...]
brew (where|edit) [FORMULA...]
http://docs.brew.sh/Formula-Cookbook.html
Further help:
......
#: * `where` <formulae>:
#: echo location of the specified <formulae> to stdout
require "formula"
module Homebrew
module_function
def where
raise FormulaUnspecifiedError if ARGV.named.empty?
ARGV.resolved_formulae.each do |f|
puts "#{f.path}\n"
end
end
end
......@@ -120,6 +120,7 @@ __brew_common_commands() {
'update:fetch latest version of Homebrew and all formulae'
'upgrade:upgrade outdated formulae'
'uses:show formulae which depend on a formula'
'where:location of formulae'
'--cellar:brew cellar'
'--env:brew environment'
'--repository:brew repository'
......@@ -793,6 +794,12 @@ _brew_vendor_install() {
'--target'
}
# brew where formulae:
_brew_where() {
__brew_formulae
}
# the main completion function
_brew() {
local curcontext="$curcontext" state state_descr line expl
......
......@@ -625,6 +625,7 @@ between tags.</p>
<p>If <code>--keep-tmp</code> is passed, retain the temporary directory containing
the new repository clone.</p></dd>
<dt><code>where</code> <var>formulae</var></dt><dd><p>echo location of the specified <var>formulae</var> to stdout</p></dd>
</dl>
......
......@@ -823,6 +823,10 @@ If \fB\-\-to\-tag\fR is passed, set HOMEBREW_UPDATE_TO_TAG to test updating betw
.IP
If \fB\-\-keep\-tmp\fR is passed, retain the temporary directory containing the new repository clone\.
.
.TP
\fBwhere\fR \fIformulae\fR
echo location of the specified \fIformulae\fR to stdout
.
.SH "OFFICIAL EXTERNAL COMMANDS"
.
.TP
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment