aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorAdam Vandenberg2009-11-16 15:31:15 -0800
committerAdam Vandenberg2009-11-19 14:03:07 -0800
commit95e398ab130b1edd5346b74e684c30f02ce61e62 (patch)
tree7731c3702c4cabdaa126f5ebd3714e6d86a02d2e /bin
parentaf29299f37417f436f6fb0a612578abb3edfd21b (diff)
downloadbrew-95e398ab130b1edd5346b74e684c30f02ce61e62.tar.bz2
Add alias support to formulae
* brew install will find an aliased formula * aliases are searched against * warn when creating a new formula that has an existing alias. If Subversion has an alias "svn", then warn when the user tries to create a new formula "svn". The formula can still be created, though the user should make sure it's not a duplicate of the existing aliased one. Subversion and Objective-Caml formulas get some alises here, so we have something to test against.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/brew4
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/brew b/bin/brew
index 7b42a8f19..adc5e51c1 100755
--- a/bin/brew
+++ b/bin/brew
@@ -98,7 +98,9 @@ begin
end
when 'search', '-S'
- formulae = (HOMEBREW_REPOSITORY+'Library/Formula').children.sort.map{|f| f.basename('.rb') }
+ require "formula"
+ formulae = Formulary.names with_aliases=true
+
if ARGV.first =~ /^\/(.*)\/$/
puts_columns formulae.grep(Regexp.new($1))
else