cmd/list: delineate formulae and casks
Listing everything without qualifying which is which is confusing for some users. Fixes #10897.
This commit is contained in:
parent
7e2ba95169
commit
8538970567
@ -116,8 +116,16 @@ module Homebrew
|
|||||||
ls_args << "-r" if args.r?
|
ls_args << "-r" if args.r?
|
||||||
ls_args << "-t" if args.t?
|
ls_args << "-t" if args.t?
|
||||||
|
|
||||||
safe_system "ls", *ls_args, HOMEBREW_CELLAR unless args.cask?
|
ohai "Formulae" if $stdout.tty? && !args.formula?
|
||||||
list_casks(args: args) unless args.formula?
|
safe_system "ls", *ls_args, HOMEBREW_CELLAR
|
||||||
|
|
||||||
|
unless args.formula?
|
||||||
|
if $stdout.tty?
|
||||||
|
puts
|
||||||
|
ohai "Casks"
|
||||||
|
end
|
||||||
|
list_casks(args: args)
|
||||||
|
end
|
||||||
elsif args.verbose? || !$stdout.tty?
|
elsif args.verbose? || !$stdout.tty?
|
||||||
system_command! "find", args: args.named.to_kegs.map(&:to_s) + %w[-not -type d -print], print_stdout: true
|
system_command! "find", args: args.named.to_kegs.map(&:to_s) + %w[-not -type d -print], print_stdout: true
|
||||||
else
|
else
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user