aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Nagel2011-09-11 16:23:39 -0500
committerJack Nagel2011-09-12 15:43:18 -0500
commit2313a4d2af555235f54eb7dbd426e708a5200e33 (patch)
tree72d29c486516867297e73b3f32c214697f2d6386
parentc9e91196b26dda89eb6fbda8e5d0a7dd53966d2a (diff)
downloadhomebrew-2313a4d2af555235f54eb7dbd426e708a5200e33.tar.bz2
brew-options: add --installed flag
`brew options --installed` will print options for formulae that are already installed. Closes #7565. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
-rw-r--r--Library/Contributions/manpages/brew.1.md4
-rw-r--r--Library/Homebrew/cmd/options.rb2
-rw-r--r--share/man/man1/brew.15
3 files changed, 9 insertions, 2 deletions
diff --git a/Library/Contributions/manpages/brew.1.md b/Library/Contributions/manpages/brew.1.md
index ef991dffa..ab0081824 100644
--- a/Library/Contributions/manpages/brew.1.md
+++ b/Library/Contributions/manpages/brew.1.md
@@ -184,7 +184,7 @@ For the full command list, see the COMMANDS section.
If no <formulae> are given, check all installed brews.
- * `options [--compact] [--all]` <formula>:
+ * `options [--compact] [--all] [--installed]` <formula>:
Display install options specific to <formula>.
If `--compact` is passed, show all options on a single line separated by
@@ -192,6 +192,8 @@ For the full command list, see the COMMANDS section.
If `--all` is passed, show options for all formulae.
+ If `--installed` is passed, show options for all installed formulae.
+
* `outdated [--quiet]`:
Show formulae that have an updated version available.
diff --git a/Library/Homebrew/cmd/options.rb b/Library/Homebrew/cmd/options.rb
index 8145e517b..454a2c7ce 100644
--- a/Library/Homebrew/cmd/options.rb
+++ b/Library/Homebrew/cmd/options.rb
@@ -3,6 +3,8 @@ require 'formula'
def ff
if ARGV.include? "--all"
Formula.all
+ elsif ARGV.include? "--installed"
+ Formula.all.reject{ |f| not f.installed? }
else
ARGV.formulae
end
diff --git a/share/man/man1/brew.1 b/share/man/man1/brew.1
index d2a72844a..d6c9870ef 100644
--- a/share/man/man1/brew.1
+++ b/share/man/man1/brew.1
@@ -206,7 +206,7 @@ Check the given \fIformulae\fR for missing dependencies\.
If no \fIformulae\fR are given, check all installed brews\.
.
.TP
-\fBoptions [\-\-compact] [\-\-all]\fR \fIformula\fR
+\fBoptions [\-\-compact] [\-\-all] [\-\-installed]\fR \fIformula\fR
Display install options specific to \fIformula\fR\.
.
.IP
@@ -215,6 +215,9 @@ If \fB\-\-compact\fR is passed, show all options on a single line separated by s
.IP
If \fB\-\-all\fR is passed, show options for all formulae\.
.
+.IP
+If \fB\-\-installed\fR is passed, show options for all installed formulae\.
+.
.TP
\fBoutdated [\-\-quiet]\fR
Show formulae that have an updated version available\.