Merge pull request #10899 from carlocab/ls-delineate
cmd/list: delineate formulae and casks
This commit is contained in:
commit
e1385b0754
@ -116,8 +116,18 @@ module Homebrew
|
||||
ls_args << "-r" if args.r?
|
||||
ls_args << "-t" if args.t?
|
||||
|
||||
safe_system "ls", *ls_args, HOMEBREW_CELLAR unless args.cask?
|
||||
list_casks(args: args) unless args.formula?
|
||||
if HOMEBREW_CELLAR.exist? && HOMEBREW_CELLAR.children.any?
|
||||
ohai "Formulae" if $stdout.tty? && !args.formula?
|
||||
safe_system "ls", *ls_args, HOMEBREW_CELLAR
|
||||
end
|
||||
|
||||
if !args.formula? && Cask::Caskroom.casks.any?
|
||||
if $stdout.tty?
|
||||
puts
|
||||
ohai "Casks"
|
||||
end
|
||||
list_casks(args: args)
|
||||
end
|
||||
elsif args.verbose? || !$stdout.tty?
|
||||
system_command! "find", args: args.named.to_kegs.map(&:to_s) + %w[-not -type d -print], print_stdout: true
|
||||
else
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user