aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/deps.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/Library/Homebrew/cmd/deps.rb b/Library/Homebrew/cmd/deps.rb
index dfdd2d9f8..738023a88 100644
--- a/Library/Homebrew/cmd/deps.rb
+++ b/Library/Homebrew/cmd/deps.rb
@@ -1,4 +1,4 @@
-#: * `deps` [`--1`] [`-n`] [`--union`] [`--installed`] [`--include-build`] [`--include-optional`] [`--skip-recommended`] <formulae>:
+#: * `deps` [`--1`] [`-n`] [`--union`] [`--full-name`] [`--installed`] [`--include-build`] [`--include-optional`] [`--skip-recommended`] <formulae>:
#: Show dependencies for <formulae>. When given multiple formula arguments,
#: show the intersection of dependencies for <formulae>.
#:
@@ -10,6 +10,8 @@
#: If `--union` is passed, show the union of dependencies for <formulae>,
#: instead of the intersection.
#:
+#: If `--full-name` is passed, list dependencies by their full name.
+#:
#: If `--installed` is passed, only list those dependencies that are
#: currently installed.
#:
@@ -62,7 +64,11 @@ module Homebrew
else
all_deps = deps_for_formulae(ARGV.formulae, !ARGV.one?, &(mode.union? ? :| : :&))
all_deps = all_deps.select(&:installed?) if mode.installed?
- all_deps = all_deps.map(&:name).uniq
+ if ARGV.include? "--full-name"
+ all_deps = all_deps.map(&:to_formula).map(&:full_name).uniq
+ else
+ all_deps = all_deps.map(&:name).uniq
+ end
all_deps.sort! unless mode.topo_order?
puts all_deps
end