aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorAdam Vandenberg2010-08-11 20:51:33 -0700
committerAdam Vandenberg2010-08-11 20:54:29 -0700
commit77c70ec47260e286e2b205d8bef3d1baebf1fb48 (patch)
treeedac2ae3ad054778b7024117de558f9d6965234a /bin
parent64cf554a7bf5e3f4212ebde7295df301241f679c (diff)
downloadbrew-77c70ec47260e286e2b205d8bef3d1baebf1fb48.tar.bz2
Add "brew uses --installed"
Passing --installed will limit the list to formulae that you have installed. Documented this and "brew deps --1" which limits the dependency list to one level down (direct dependencies).
Diffstat (limited to 'bin')
-rwxr-xr-xbin/brew4
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/brew b/bin/brew
index c2b862e48..960829b58 100755
--- a/bin/brew
+++ b/bin/brew
@@ -258,7 +258,9 @@ begin
# For each formula given, show which other formulas depend on it.
# We only go one level up, ie. direct dependencies.
when 'uses'
- puts *ARGV.formulae.map{ |f| Formula.all.select{ |ff| ff.deps.include? f.name }.map{|f| f.name} }.flatten.uniq.sort
+ uses = ARGV.formulae.map{ |f| Formula.all.select{ |ff| ff.deps.include? f.name }.map{|f| f.name} }.flatten.uniq
+ uses = uses.select { |f| Formula.factory(f).installed? } if ARGV.include? "--installed"
+ puts *uses.sort
when 'deps'
require 'formula_installer'