Sort the output from brew install
This commit is contained in:
parent
d11165cd97
commit
8b1b3d2a97
@ -64,6 +64,9 @@ module HomebrewArgvExtension
|
|||||||
def debug?
|
def debug?
|
||||||
flag? '--debug' or ENV['HOMEBREW_DEBUG']
|
flag? '--debug' or ENV['HOMEBREW_DEBUG']
|
||||||
end
|
end
|
||||||
|
def quieter?
|
||||||
|
flag? '--quieter'
|
||||||
|
end
|
||||||
|
|
||||||
def flag? flag
|
def flag? flag
|
||||||
options.each do |arg|
|
options.each do |arg|
|
||||||
|
|||||||
7
bin/brew
7
bin/brew
@ -1,4 +1,5 @@
|
|||||||
#!/usr/bin/ruby
|
#!/usr/bin/ruby
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
$:.unshift ENV['RUBYLIB']=File.expand_path(__FILE__+'/../../Library/Homebrew')
|
$:.unshift ENV['RUBYLIB']=File.expand_path(__FILE__+'/../../Library/Homebrew')
|
||||||
require 'pathname+yeast'
|
require 'pathname+yeast'
|
||||||
require 'ARGV+yeast'
|
require 'ARGV+yeast'
|
||||||
@ -70,8 +71,10 @@ begin
|
|||||||
if ARGV.named_empty?
|
if ARGV.named_empty?
|
||||||
# TODO I tried to columnise it using the 'column' utility but it uses
|
# TODO I tried to columnise it using the 'column' utility but it uses
|
||||||
# tabs rather than spaces and the output looked wrong
|
# tabs rather than spaces and the output looked wrong
|
||||||
puts "Available formulae:"
|
puts "You must specify a formula. The following are available:" unless ARGV.quieter?
|
||||||
(HOMEBREW_PREFIX+'Library'+'Formula').children.each {|f| puts f.basename('.rb') }
|
(HOMEBREW_PREFIX+'Library'+'Formula').children.sort.each do |f|
|
||||||
|
puts f.basename('.rb')
|
||||||
|
end
|
||||||
exit 0
|
exit 0
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user