cmd/list: always use ls when no named args are passed
This has the added benefit of making the indentation in the output of `brew list` uniform between formulae and casks. Follow-up to #10899. See, in particular, https://github.com/Homebrew/brew/pull/10899#discussion_r598659321
This commit is contained in:
parent
e79f315eee
commit
e966808ac6
@ -45,14 +45,14 @@ module Homebrew
|
|||||||
description: "Force output to be one entry per line. " \
|
description: "Force output to be one entry per line. " \
|
||||||
"This is the default when output is not to a terminal."
|
"This is the default when output is not to a terminal."
|
||||||
switch "-l",
|
switch "-l",
|
||||||
depends_on: "--formula",
|
description: "List formulae and/or casks in long format. " \
|
||||||
description: "List formulae in long format."
|
"Has no effect when a formula or cask name is passed as an argument."
|
||||||
switch "-r",
|
switch "-r",
|
||||||
depends_on: "--formula",
|
description: "Reverse the order of the formulae and/or casks sort to list the oldest entries first. " \
|
||||||
description: "Reverse the order of the formulae sort to list the oldest entries first."
|
"Has no effect when a formula or cask name is passed as an argument."
|
||||||
switch "-t",
|
switch "-t",
|
||||||
depends_on: "--formula",
|
description: "Sort formulae and/or casks by time modified, listing most recently modified first. " \
|
||||||
description: "Sort formulae by time modified, listing most recently modified first."
|
"Has no effect when a formula or cask name is passed as an argument."
|
||||||
|
|
||||||
conflicts "--formula", "--cask"
|
conflicts "--formula", "--cask"
|
||||||
conflicts "--full-name", "--versions"
|
conflicts "--full-name", "--versions"
|
||||||
@ -126,7 +126,7 @@ module Homebrew
|
|||||||
puts
|
puts
|
||||||
ohai "Casks"
|
ohai "Casks"
|
||||||
end
|
end
|
||||||
list_casks(args: args)
|
safe_system "ls", *ls_args, Cask::Caskroom.path
|
||||||
end
|
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
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user