aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd
diff options
context:
space:
mode:
authorMarkus Reiter2016-08-26 16:04:47 +0200
committerMarkus Reiter2016-10-01 20:00:49 +0200
commit6d8ee395fa5878282a1ce3975b632103448be042 (patch)
tree557520df749494a6a58ee54a139d4238ad41380d /Library/Homebrew/cmd
parent19e633f1900ea910c2a9db85dc7c7bea0825676d (diff)
downloadbrew-6d8ee395fa5878282a1ce3975b632103448be042.tar.bz2
Refactor Tty.
Diffstat (limited to 'Library/Homebrew/cmd')
-rw-r--r--Library/Homebrew/cmd/doctor.rb2
-rw-r--r--Library/Homebrew/cmd/help.rb10
-rw-r--r--Library/Homebrew/cmd/info.rb4
-rw-r--r--Library/Homebrew/cmd/update-report.rb2
4 files changed, 9 insertions, 9 deletions
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