aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2012-01-01 15:27:21 -0600
committerJack Nagel2012-01-03 19:50:20 -0600
commitaee6acecdcb6f0dbd844bd8b3b0246c461cb1b0f (patch)
tree92d221d1a8f4aed825b42bce286f309eae31e246 /Library
parent5079980d0c0a5d7b7d72a4b71fc085824d94863f (diff)
downloadhomebrew-aee6acecdcb6f0dbd844bd8b3b0246c461cb1b0f.tar.bz2
info: always mark currently linked keg with *
When multiple kegs are installed, `brew info` marks a keg with an asterisk if f.installed_prefix == keg, but this is only true if either HEAD or the newest version of the formula is installed. This isn't always useful, so let's mark the currently linked keg with an asterisk regardless of the version. Obviously, keg-only formula will never be marked, but this is probably a feature. When multiple keg-only kegs exist, chances are that they are each being utilized by something, so there isn't really a "used" and "unused" version. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/info.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/Library/Homebrew/cmd/info.rb b/Library/Homebrew/cmd/info.rb
index 59c39ebe9..0c6b3829e 100644
--- a/Library/Homebrew/cmd/info.rb
+++ b/Library/Homebrew/cmd/info.rb
@@ -1,5 +1,6 @@
require 'formula'
require 'tab'
+require 'keg'
module Homebrew extend self
def info
@@ -56,7 +57,7 @@ module Homebrew extend self
kegs.each do |keg|
next if keg.basename.to_s == '.DS_Store'
print "#{keg} (#{keg.abv})"
- print " *" if f.installed_prefix == keg and kegs.length > 1
+ print " *" if Keg.new(keg).linked? and kegs.length > 1
puts
tab = Tab.for_keg keg
unless tab.used_options.empty?