aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Nagel2012-01-01 15:27:21 -0600
committerJack Nagel2012-01-03 19:50:20 -0600
commit6858c00febc4d326f654eb0d6b89fd0083b01ddf (patch)
treeb3c48aaac4d8e23c86e7b639f4d1fc9d2b556899
parentd2bf7b4e2c18bb4a1486ca1af174daf32d89154d (diff)
downloadbrew-6858c00febc4d326f654eb0d6b89fd0083b01ddf.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>
-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?