diff options
Diffstat (limited to 'Library/Homebrew/cmd')
| -rw-r--r-- | Library/Homebrew/cmd/commands.rb | 8 | ||||
| -rw-r--r-- | Library/Homebrew/cmd/install.rb | 4 | ||||
| -rw-r--r-- | Library/Homebrew/cmd/list.rb | 2 | ||||
| -rw-r--r-- | Library/Homebrew/cmd/search.rb | 9 | ||||
| -rw-r--r-- | Library/Homebrew/cmd/update-report.rb | 2 | ||||
| -rw-r--r-- | Library/Homebrew/cmd/uses.rb | 2 |
6 files changed, 14 insertions, 13 deletions
diff --git a/Library/Homebrew/cmd/commands.rb b/Library/Homebrew/cmd/commands.rb index f6445d560..addccd609 100644 --- a/Library/Homebrew/cmd/commands.rb +++ b/Library/Homebrew/cmd/commands.rb @@ -12,22 +12,22 @@ module Homebrew cmds = internal_commands + external_commands cmds += internal_developer_commands cmds += HOMEBREW_INTERNAL_COMMAND_ALIASES.keys if ARGV.include? "--include-aliases" - puts_columns cmds.sort + puts Formatter.columns(cmds.sort) else # Find commands in Homebrew/cmd puts "Built-in commands" - puts_columns internal_commands + puts Formatter.columns(internal_commands) # Find commands in Homebrew/dev-cmd puts puts "Built-in developer commands" - puts_columns internal_developer_commands + puts Formatter.columns(internal_developer_commands) # Find commands in the path unless (exts = external_commands).empty? puts puts "External commands" - puts_columns exts + puts Formatter.columns(exts) end end end diff --git a/Library/Homebrew/cmd/install.rb b/Library/Homebrew/cmd/install.rb index 209fe8bad..2c027a52e 100644 --- a/Library/Homebrew/cmd/install.rb +++ b/Library/Homebrew/cmd/install.rb @@ -183,7 +183,7 @@ module Homebrew puts "To install it, run:\n brew install #{formulae_search_results.first}" else puts "These similarly named formulae were found:" - puts_columns(formulae_search_results) + puts Formatter.columns(formulae_search_results) puts "To install one of them, run (for example):\n brew install #{formulae_search_results.first}" end @@ -198,7 +198,7 @@ module Homebrew puts "To install it, run:\n brew install #{taps_search_results.first}" else puts "These formulae were found in taps:" - puts_columns(taps_search_results) + puts Formatter.columns(taps_search_results) puts "To install one of them, run (for example):\n brew install #{taps_search_results.first}" end end diff --git a/Library/Homebrew/cmd/list.rb b/Library/Homebrew/cmd/list.rb index 93c2545ad..3496580f4 100644 --- a/Library/Homebrew/cmd/list.rb +++ b/Library/Homebrew/cmd/list.rb @@ -49,7 +49,7 @@ module Homebrew end end return if full_names.empty? - puts_columns full_names + puts Formatter.columns(full_names) else ENV["CLICOLOR"] = nil exec "ls", *ARGV.options_only << HOMEBREW_CELLAR diff --git a/Library/Homebrew/cmd/search.rb b/Library/Homebrew/cmd/search.rb index f0a276929..d69164eb9 100644 --- a/Library/Homebrew/cmd/search.rb +++ b/Library/Homebrew/cmd/search.rb @@ -27,7 +27,7 @@ module Homebrew def search if ARGV.empty? - puts_columns Formula.full_names + puts Formatter.columns(Formula.full_names) elsif ARGV.include? "--macports" exec_browser "https://www.macports.org/ports.php?by=name&substr=#{ARGV.next}" elsif ARGV.include? "--fink" @@ -54,14 +54,15 @@ module Homebrew result = search_tap(user, repo, name) end - puts_columns Array(result) + results = Array(result) + puts Formatter.columns(results) unless results.empty? else query = ARGV.first regex = query_regexp(query) local_results = search_formulae(regex) - puts_columns(local_results) unless local_results.empty? + puts Formatter.columns(local_results) unless local_results.empty? tap_results = search_taps(regex) - puts_columns(tap_results) unless tap_results.empty? + puts Formatter.columns(tap_results) unless tap_results.empty? if $stdout.tty? count = local_results.length + tap_results.length diff --git a/Library/Homebrew/cmd/update-report.rb b/Library/Homebrew/cmd/update-report.rb index 629ce1f3f..72dcc293d 100644 --- a/Library/Homebrew/cmd/update-report.rb +++ b/Library/Homebrew/cmd/update-report.rb @@ -553,7 +553,7 @@ class ReporterHub return if formulae.empty? # Dump formula list. ohai title - puts_columns(formulae) + puts Formatter.columns(formulae) end def installed?(formula) diff --git a/Library/Homebrew/cmd/uses.rb b/Library/Homebrew/cmd/uses.rb index 66088e217..fb11a31a7 100644 --- a/Library/Homebrew/cmd/uses.rb +++ b/Library/Homebrew/cmd/uses.rb @@ -94,6 +94,6 @@ module Homebrew end return if uses.empty? - puts_columns uses.map(&:full_name) + puts Formatter.columns(uses.map(&:full_name)) end end |
