From 4b5052f614cef064ed68fcd854a82656256451ea Mon Sep 17 00:00:00 2001 From: Max Howell Date: Sat, 4 Aug 2012 15:40:36 -0400 Subject: Show options for foo with `brew info foo` About time right?--- Library/Homebrew/cmd/info.rb | 7 ++++++- Library/Homebrew/cmd/options.rb | 16 ++++++++++------ 2 files changed, 16 insertions(+), 7 deletions(-) (limited to 'Library') 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 -- cgit v1.2.3