From 87398e743693942f78285c158d46f9c1502d2002 Mon Sep 17 00:00:00 2001 From: Adam Vandenberg Date: Thu, 10 Mar 2011 21:32:10 -0800 Subject: [PATCH] 'brew options' now an official command --- Library/Contributions/examples/brew-options.rb | 15 --------------- Library/Homebrew/cmd/options.rb | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 15 deletions(-) delete mode 100755 Library/Contributions/examples/brew-options.rb create mode 100644 Library/Homebrew/cmd/options.rb diff --git a/Library/Contributions/examples/brew-options.rb b/Library/Contributions/examples/brew-options.rb deleted file mode 100755 index 4b110232d2..0000000000 --- a/Library/Contributions/examples/brew-options.rb +++ /dev/null @@ -1,15 +0,0 @@ -compact = ARGV.include? '--compact' - -ARGV.formulae.each do |f| - f.options rescue next - if 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 - end -end diff --git a/Library/Homebrew/cmd/options.rb b/Library/Homebrew/cmd/options.rb new file mode 100644 index 0000000000..c03fdeafe5 --- /dev/null +++ b/Library/Homebrew/cmd/options.rb @@ -0,0 +1,17 @@ +module Homebrew extend self + def options + ARGV.formulae.each do |f| + f.options rescue next + 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 + end + end + end +end \ No newline at end of file