'brew options' now an official command
This commit is contained in:
parent
bda9ffa5d7
commit
87398e7436
@ -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
|
|
||||||
17
Library/Homebrew/cmd/options.rb
Normal file
17
Library/Homebrew/cmd/options.rb
Normal 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
|
||||||
Loading…
x
Reference in New Issue
Block a user