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 <flangy@gmail.com>
This commit is contained in:
parent
e714a47c10
commit
5f2f6a35dd
@ -78,7 +78,7 @@ Note that these flags should only appear after a command.
|
|||||||
The options `--set-name` and `--set-version` each take an argument and allow
|
The options `--set-name` and `--set-version` each take an argument and allow
|
||||||
you to explicitly set the name and version of the package you are creating.
|
you to explicitly set the name and version of the package you are creating.
|
||||||
|
|
||||||
* `deps [--1] [-n] [--tree] [--all]` <formula>:
|
* `deps [--1] [-n] [--tree] [--all] [--installed]` <formula>:
|
||||||
Show <formula>'s dependencies.
|
Show <formula>'s dependencies.
|
||||||
|
|
||||||
If `--1` is passed, only show dependencies one level down, instead of
|
If `--1` is passed, only show dependencies one level down, instead of
|
||||||
|
|||||||
@ -9,7 +9,11 @@ end
|
|||||||
|
|
||||||
module Homebrew extend self
|
module Homebrew extend self
|
||||||
def deps
|
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|
|
Formula.each do |f|
|
||||||
puts "#{f.name}: #{f.deps*' '}"
|
puts "#{f.name}: #{f.deps*' '}"
|
||||||
end
|
end
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
.\" generated with Ronn/v0.7.3
|
.\" generated with Ronn/v0.7.3
|
||||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||||
.
|
.
|
||||||
.TH "BREW" "1" "February 2013" "Homebrew" "brew"
|
.TH "BREW" "1" "March 2013" "Homebrew" "brew"
|
||||||
.
|
.
|
||||||
.SH "NAME"
|
.SH "NAME"
|
||||||
\fBbrew\fR \- The missing package manager for OS X
|
\fBbrew\fR \- The missing package manager for OS X
|
||||||
@ -84,7 +84,7 @@ If \fB\-\-no\-fetch\fR is passed, Homebrew will not download \fIURL\fR to the ca
|
|||||||
The options \fB\-\-set\-name\fR and \fB\-\-set\-version\fR each take an argument and allow you to explicitly set the name and version of the package you are creating\.
|
The options \fB\-\-set\-name\fR and \fB\-\-set\-version\fR each take an argument and allow you to explicitly set the name and version of the package you are creating\.
|
||||||
.
|
.
|
||||||
.TP
|
.TP
|
||||||
\fBdeps [\-\-1] [\-n] [\-\-tree] [\-\-all]\fR \fIformula\fR
|
\fBdeps [\-\-1] [\-n] [\-\-tree] [\-\-all] [\-\-installed]\fR \fIformula\fR
|
||||||
Show \fIformula\fR\'s dependencies\.
|
Show \fIformula\fR\'s dependencies\.
|
||||||
.
|
.
|
||||||
.IP
|
.IP
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user