Show options for foo with brew info foo

About time right?
This commit is contained in:
Max Howell 2012-08-04 15:40:36 -04:00
parent 28bbced64b
commit 4b5052f614
2 changed files with 16 additions and 7 deletions

View File

@ -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

View File

@ -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
def dump_options_for_formula f
f.options.each do |o|
puts o[0]
puts "\t"+o[1]
end
end
end