parent
0276c3c70c
commit
692795f82d
@ -1,4 +1,5 @@
|
|||||||
require "metafiles"
|
require "metafiles"
|
||||||
|
require "formula"
|
||||||
|
|
||||||
module Homebrew
|
module Homebrew
|
||||||
def list
|
def list
|
||||||
@ -16,8 +17,21 @@ module Homebrew
|
|||||||
if ARGV.include? '--pinned' or ARGV.include? '--versions'
|
if ARGV.include? '--pinned' or ARGV.include? '--versions'
|
||||||
filtered_list
|
filtered_list
|
||||||
elsif ARGV.named.empty?
|
elsif ARGV.named.empty?
|
||||||
ENV['CLICOLOR'] = nil
|
if ARGV.include? "--full-name"
|
||||||
exec 'ls', *ARGV.options_only << HOMEBREW_CELLAR
|
full_names = Formula.installed.map(&:full_name).sort do |a, b|
|
||||||
|
if a.include?("/") && !b.include?("/")
|
||||||
|
1
|
||||||
|
elsif !a.include?("/") && b.include?("/")
|
||||||
|
-1
|
||||||
|
else
|
||||||
|
a <=> b
|
||||||
|
end
|
||||||
|
end
|
||||||
|
puts_columns full_names
|
||||||
|
else
|
||||||
|
ENV['CLICOLOR'] = nil
|
||||||
|
exec 'ls', *ARGV.options_only << HOMEBREW_CELLAR
|
||||||
|
end
|
||||||
elsif ARGV.verbose? or not $stdout.tty?
|
elsif ARGV.verbose? or not $stdout.tty?
|
||||||
exec "find", *ARGV.kegs.map(&:to_s) + %w[-not -type d -print]
|
exec "find", *ARGV.kegs.map(&:to_s) + %w[-not -type d -print]
|
||||||
else
|
else
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user