From 5f2f6a35dd94acc701641105c01ff0142c7d9b14 Mon Sep 17 00:00:00 2001 From: Matt Torok Date: Tue, 5 Mar 2013 18:02:22 -0800 Subject: Added '--installed' option to `deps` command. When deps command is passed this option, it will only show the dependencies for the installed forumas. This option overrides the '--all' option. Closes Homebrew/homebrew#18276. Signed-off-by: Adam Vandenberg --- Library/Homebrew/cmd/deps.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Library/Homebrew/cmd') diff --git a/Library/Homebrew/cmd/deps.rb b/Library/Homebrew/cmd/deps.rb index 7e426f91f..9e6d450f3 100644 --- a/Library/Homebrew/cmd/deps.rb +++ b/Library/Homebrew/cmd/deps.rb @@ -9,7 +9,11 @@ end module Homebrew extend self def deps - if ARGV.include? '--all' + if ARGV.include? '--installed' + Formula.installed.each do |f| + puts "#{f.name}: #{f.deps*' '}" + end + elsif ARGV.include? '--all' Formula.each do |f| puts "#{f.name}: #{f.deps*' '}" end -- cgit v1.2.3