diff options
| author | Adam Vandenberg | 2010-08-11 20:51:33 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2010-08-11 20:54:29 -0700 |
| commit | 77c70ec47260e286e2b205d8bef3d1baebf1fb48 (patch) | |
| tree | edac2ae3ad054778b7024117de558f9d6965234a | |
| parent | 64cf554a7bf5e3f4212ebde7295df301241f679c (diff) | |
| download | brew-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).
| -rw-r--r-- | Library/Contributions/manpages/brew.1.md | 14 | ||||
| -rwxr-xr-x | bin/brew | 4 | ||||
| -rw-r--r-- | share/man/man1/brew.1 | 12 |
3 files changed, 22 insertions, 8 deletions
diff --git a/Library/Contributions/manpages/brew.1.md b/Library/Contributions/manpages/brew.1.md index aefc5f7b6..c4c645ebd 100644 --- a/Library/Contributions/manpages/brew.1.md +++ b/Library/Contributions/manpages/brew.1.md @@ -129,12 +129,18 @@ didn't include with OS X. * `outdated`: Shows formula that have an updated version available. - * `deps` <formula>: + * `deps [--1]` <formula>: Shows <formula>'s dependencies. - * `uses` <formula>: - Shows the formulas that specify <formula> as a dependency. The list is not - recursive; only one level of dependencies is resolved. + If `--1` is passed, only show dependencies one level down, instead of + recursing. + + * `uses [--installed]` <formula>: + Shows the formulas that specify <formula> as a dependency. The list is + not recursive; only one level of dependencies is resolved. + + If `--installed` is passed, the list only shows formulae you have + installed. * `doctor`: Checks your system for potential problems. @@ -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' diff --git a/share/man/man1/brew.1 b/share/man/man1/brew.1 index 74d119251..726bc9833 100644 --- a/share/man/man1/brew.1 +++ b/share/man/man1/brew.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "BREW" "1" "July 2010" "Homebrew" "brew" +.TH "BREW" "1" "August 2010" "Homebrew" "brew" . .SH "NAME" \fBbrew\fR \- The missing package manager for OS X @@ -141,13 +141,19 @@ Removes dead symlinks from the Homebrew prefix\. This is generally not needed\. Shows formula that have an updated version available\. . .TP -\fBdeps\fR \fIformula\fR +\fBdeps [\-\-1]\fR \fIformula\fR Shows \fIformula\fR\'s dependencies\. . +.IP +If \fB\-\-1\fR is passed, only show dependencies one level down, instead of recursing\. +. .TP -\fBuses\fR \fIformula\fR +\fBuses [\-\-installed]\fR \fIformula\fR Shows the formulas that specify \fIformula\fR as a dependency\. The list is not recursive; only one level of dependencies is resolved\. . +.IP +If \fB\-\-installed\fR is passed, the list only shows formulae you have installed\. +. .TP \fBdoctor\fR Checks your system for potential problems\. |
