From 6d8ee395fa5878282a1ce3975b632103448be042 Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Fri, 26 Aug 2016 16:04:47 +0200 Subject: Refactor Tty. --- Library/Homebrew/cmd/doctor.rb | 2 +- Library/Homebrew/cmd/help.rb | 10 +++++----- Library/Homebrew/cmd/info.rb | 4 ++-- Library/Homebrew/cmd/update-report.rb | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) (limited to 'Library/Homebrew/cmd') diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb index 89f32dc25..e6b5fcba0 100644 --- a/Library/Homebrew/cmd/doctor.rb +++ b/Library/Homebrew/cmd/doctor.rb @@ -42,7 +42,7 @@ module Homebrew next if out.nil? || out.empty? if first_warning $stderr.puts <<-EOS.undent - #{Tty.white}Please note that these warnings are just used to help the Homebrew maintainers + #{Tty.bold}Please note that these warnings are just used to help the Homebrew maintainers with debugging if you file an issue. If everything you use Homebrew for is working fine: please don't worry and just ignore them. Thanks!#{Tty.reset} EOS diff --git a/Library/Homebrew/cmd/help.rb b/Library/Homebrew/cmd/help.rb index 2a814b90b..05a3003cc 100644 --- a/Library/Homebrew/cmd/help.rb +++ b/Library/Homebrew/cmd/help.rb @@ -78,11 +78,11 @@ module Homebrew HOMEBREW_HELP else help_lines.map do |line| - line.slice(2..-1) - .sub(/^ \* /, "#{Tty.highlight}brew#{Tty.reset} ") - .gsub(/`(.*?)`/, "#{Tty.highlight}\\1#{Tty.reset}") - .gsub(/<(.*?)>/, "#{Tty.em}\\1#{Tty.reset}") - .gsub("@hide_from_man_page", "") + line.slice(2..-1). + sub(/^ \* /, "#{Tty.bold}brew#{Tty.reset} "). + gsub(/`(.*?)`/, "#{Tty.bold}\\1#{Tty.reset}"). + gsub(/<(.*?)>/, "#{Tty.underline}\\1#{Tty.reset}"). + gsub("@hide_from_man_page", "") end.join.strip end end diff --git a/Library/Homebrew/cmd/info.rb b/Library/Homebrew/cmd/info.rb index 6f242039c..9721585cf 100644 --- a/Library/Homebrew/cmd/info.rb +++ b/Library/Homebrew/cmd/info.rb @@ -117,7 +117,7 @@ module Homebrew puts "#{f.full_name}: #{specs * ", "}#{" [#{attrs * ", "}]" unless attrs.empty?}" puts f.desc if f.desc - puts "#{Tty.em}#{f.homepage}#{Tty.reset}" if f.homepage + puts "#{Tty.underline}#{f.homepage}#{Tty.reset}" if f.homepage conflicts = f.conflicts.map(&:name).sort! puts "Conflicts with: #{conflicts*", "}" unless conflicts.empty? @@ -133,7 +133,7 @@ module Homebrew end end - puts "From: #{Tty.em}#{github_info(f)}#{Tty.reset}" + puts "From: #{Tty.underline}#{github_info(f)}#{Tty.reset}" unless f.deps.empty? ohai "Dependencies" diff --git a/Library/Homebrew/cmd/update-report.rb b/Library/Homebrew/cmd/update-report.rb index 18f2f370c..c275606e2 100644 --- a/Library/Homebrew/cmd/update-report.rb +++ b/Library/Homebrew/cmd/update-report.rb @@ -282,7 +282,7 @@ module Homebrew EOS rescue => e ofail <<-EOS.undent - #{Tty.white}Failed to migrate HOMEBREW_REPOSITORY to #{new_homebrew_repository}! + #{Tty.bold}Failed to migrate HOMEBREW_REPOSITORY to #{new_homebrew_repository}!#{Tty.reset} The error was: #{e} Please try to resolve this error yourself and then run `brew update` again to -- cgit v1.2.3