aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/search.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/Library/Homebrew/cmd/search.rb b/Library/Homebrew/cmd/search.rb
index 1d6d2d431..5ac9db391 100644
--- a/Library/Homebrew/cmd/search.rb
+++ b/Library/Homebrew/cmd/search.rb
@@ -20,6 +20,13 @@ module Homebrew
exec_browser "https://admin.fedoraproject.org/pkgdb/packages/%2A#{ARGV.next}%2A/"
elsif ARGV.include? '--ubuntu'
exec_browser "http://packages.ubuntu.com/search?keywords=#{ARGV.next}&searchon=names&suite=all&section=all"
+ elsif ARGV.include? '--desc'
+ query = ARGV.next
+ Formula.each do |formula|
+ if formula.desc =~ query_regexp(query)
+ puts "#{formula.name}: #{formula.desc}"
+ end
+ end
elsif ARGV.empty?
puts_columns Formula.names
elsif ARGV.first =~ HOMEBREW_TAP_FORMULA_REGEX