This repository has been archived by the owner. It is now read-only.
Permalink
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...
1 parent b9ae3ef commit b0632795cfb2741eb328b554e1a90f00cd83b9bf @mkhl mkhl committed with adamv Feb 27, 2010
Showing with 6 additions and 1 deletion.
  1. +6 −1 bin/brew
View
@@ -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'

0 comments on commit b063279

Please sign in to comment.