Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add support for `brew --prefix [formula ...]`.

When `brew --prefix` is called with arguments, assume each argument is a
formula and print their prefixes instead.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
  • Loading branch information...
commit b0632795cfb2741eb328b554e1a90f00cd83b9bf 1 parent b9ae3ef
@mkhl mkhl authored adamv committed
Showing with 6 additions and 1 deletion.
  1. +6 −1 bin/brew
View
7 bin/brew
@@ -81,7 +81,12 @@ begin
case arg = ARGV.shift
when '--prefix'
- puts HOMEBREW_PREFIX
+ if ARGV.named.empty?
+ puts HOMEBREW_PREFIX
+ else
+ puts *ARGV.formulae.collect {|f| f.prefix}
+ end
+
when '--repository'
puts HOMEBREW_REPOSITORY
when '--cellar'
Please sign in to comment.
Something went wrong with that request. Please try again.