info: highlight package name

This commit is contained in:
fn ⌃ ⌥ 2022-08-12 23:44:45 -07:00
parent 63ced67928
commit a208ea9c92
3 changed files with 8 additions and 4 deletions

View File

@ -79,7 +79,7 @@ module Cask
end
def self.title_info(cask)
title = "#{cask.token}: #{cask.version}"
title = "#{oh1_title(cask.token)}: #{cask.version}"
title += " (auto_updates)" if cask.auto_updates
title
end

View File

@ -274,7 +274,7 @@ module Homebrew
attrs << "pinned at #{f.pinned_version}" if f.pinned?
attrs << "keg-only" if f.keg_only?
puts "#{f.full_name}: #{specs * ", "}#{" [#{attrs * ", "}]" unless attrs.empty?}"
puts "#{oh1_title(f.full_name)}: #{specs * ", "}#{" [#{attrs * ", "}]" unless attrs.empty?}"
puts f.desc if f.desc
puts Formatter.url(f.homepage) if f.homepage

View File

@ -125,7 +125,7 @@ module Kernel
puts sput unless sput.empty?
end
def oh1(title, truncate: :auto)
def oh1_title(title, truncate: :auto)
verbose = if respond_to?(:verbose?)
verbose?
else
@ -133,7 +133,11 @@ module Kernel
end
title = Tty.truncate(title) if $stdout.tty? && !verbose && truncate == :auto
puts Formatter.headline(title, color: :green)
Formatter.headline(title, color: :green)
end
def oh1(title, truncate: :auto)
puts oh1_title(title, truncate: truncate)
end
# Print a message prefixed with "Warning" (do this rarely).