aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorAdam Vandenberg2011-03-10 21:32:10 -0800
committerAdam Vandenberg2011-03-12 11:55:10 -0800
commit87398e743693942f78285c158d46f9c1502d2002 (patch)
tree41cecbfa7bc8ad05a3f0c5fe098ad9956be9fa4a /Library
parentbda9ffa5d7fd08011da9d82e24252478c8681544 (diff)
downloadbrew-87398e743693942f78285c158d46f9c1502d2002.tar.bz2
'brew options' now an official command
Diffstat (limited to 'Library')
-rwxr-xr-xLibrary/Contributions/examples/brew-options.rb15
-rw-r--r--Library/Homebrew/cmd/options.rb17
2 files changed, 17 insertions, 15 deletions
diff --git a/Library/Contributions/examples/brew-options.rb b/Library/Contributions/examples/brew-options.rb
deleted file mode 100755
index 4b110232d..000000000
--- 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 000000000..c03fdeafe
--- /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