improve brew info
* Show pinned and keg-only as attributes, where pinned version is shown as well. * Use brackets instead of parentheses to distinguish formula attributes(e.g. keg-only) with spec attributes(e.g. bottled) * Don't show blank line for formula without homepage. * Don't show duplicated keg-only message which will be shown later in caveats. * Underline urls. * Remove unnecessary github_info return value check, which is always existed. Closes Homebrew/homebrew#46037. Signed-off-by: Xu Cheng <xucheng@me.com>
This commit is contained in:
parent
02d7abe2ec
commit
14fbc8c39e
@ -105,18 +105,13 @@ module Homebrew
|
||||
|
||||
specs << "HEAD" if f.head
|
||||
|
||||
puts "#{f.full_name}: #{specs*", "}#{" (pinned)" if f.pinned?}"
|
||||
attrs = []
|
||||
attrs << "pinned at #{f.pinned_version}" if f.pinned?
|
||||
attrs << "keg-only" if f.keg_only?
|
||||
|
||||
puts "#{f.full_name}: #{specs * ", "}#{" [#{attrs * ", "}]" if attrs.any?}"
|
||||
puts f.desc if f.desc
|
||||
|
||||
puts f.homepage
|
||||
|
||||
if f.keg_only?
|
||||
puts
|
||||
puts "This formula is keg-only."
|
||||
puts f.keg_only_reason
|
||||
puts
|
||||
end
|
||||
puts "#{Tty.em}#{f.homepage}#{Tty.reset}" if f.homepage
|
||||
|
||||
conflicts = f.conflicts.map(&:name).sort!
|
||||
puts "Conflicts with: #{conflicts*", "}" unless conflicts.empty?
|
||||
@ -132,8 +127,7 @@ module Homebrew
|
||||
puts "Not installed"
|
||||
end
|
||||
|
||||
history = github_info(f)
|
||||
puts "From: #{history}" if history
|
||||
puts "From: #{Tty.em}#{github_info(f)}#{Tty.reset}"
|
||||
|
||||
unless f.deps.empty?
|
||||
ohai "Dependencies"
|
||||
|
Loading…
x
Reference in New Issue
Block a user