aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd
diff options
context:
space:
mode:
authorMax Howell2012-08-04 15:40:36 -0400
committerMax Howell2012-08-04 15:40:36 -0400
commit4b5052f614cef064ed68fcd854a82656256451ea (patch)
tree8128dda5d0220f3c374c95a400a95295dd1f2382 /Library/Homebrew/cmd
parent28bbced64bbb6874d6fc06d18ca8a9571ed4e4e3 (diff)
downloadbrew-4b5052f614cef064ed68fcd854a82656256451ea.tar.bz2
Show options for foo with `brew info foo`
About time right?
Diffstat (limited to 'Library/Homebrew/cmd')
-rw-r--r--Library/Homebrew/cmd/info.rb7
-rw-r--r--Library/Homebrew/cmd/options.rb16
2 files changed, 16 insertions, 7 deletions
diff --git a/Library/Homebrew/cmd/info.rb b/Library/Homebrew/cmd/info.rb
index 0489a02e0..02cacff1d 100644
--- a/Library/Homebrew/cmd/info.rb
+++ b/Library/Homebrew/cmd/info.rb
@@ -93,9 +93,14 @@ module Homebrew extend self
history = github_info(f)
puts history if history
+ unless f.options.empty?
+ require 'cmd/options'
+ ohai "Options"
+ Homebrew.dump_options_for_formula f
+ end
+
the_caveats = (f.caveats || "").strip
unless the_caveats.empty?
- puts
ohai "Caveats"
puts f.caveats
end
diff --git a/Library/Homebrew/cmd/options.rb b/Library/Homebrew/cmd/options.rb
index 696d4a46a..a8dfcc04a 100644
--- a/Library/Homebrew/cmd/options.rb
+++ b/Library/Homebrew/cmd/options.rb
@@ -23,13 +23,17 @@ module Homebrew extend self
if ARGV.include? '--compact'
puts f.options.collect {|o| o[0]} * " "
else
- puts f.name
- f.options.each do |o|
- puts o[0]
- puts "\t"+o[1]
- end
+ puts f.name if ff.length > 1
+ dump_options_for_formula f
puts
end
end
end
-end \ No newline at end of file
+
+ def dump_options_for_formula f
+ f.options.each do |o|
+ puts o[0]
+ puts "\t"+o[1]
+ end
+ end
+end