'brew options' now an official command

This commit is contained in:
Adam Vandenberg 2011-03-10 21:32:10 -08:00
parent bda9ffa5d7
commit 87398e7436
2 changed files with 17 additions and 15 deletions

View File

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

View File

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