aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorAdam Vandenberg2010-06-01 13:02:19 -0700
committerAdam Vandenberg2010-06-01 13:02:19 -0700
commit54655a681f4c628f7e59990e22f0460c273c8874 (patch)
treeec8faf7f3aedb580440d57dabf13836007107b50 /bin
parentb72ddaa42468685cae8c8f043cad2c50e93f4575 (diff)
downloadbrew-54655a681f4c628f7e59990e22f0460c273c8874.tar.bz2
Escape search terms. Fixes Homebrew/homebrew#1475
Diffstat (limited to 'bin')
-rwxr-xr-xbin/brew3
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/brew b/bin/brew
index 92cd02876..715daa61a 100755
--- a/bin/brew
+++ b/bin/brew
@@ -133,7 +133,8 @@ begin
if ARGV.first =~ /^\/(.*)\/$/
puts_columns formulae.grep(Regexp.new($1))
else
- puts_columns formulae.grep(/.*#{ARGV.first}.*/)
+ search_term = Regexp.escape(ARGV.first)
+ puts_columns formulae.grep(/.*#{search_term}.*/)
end
when 'edit'