brew list --versions --multiple
With --multiple, only list formulae with multiple versions installed.
This commit is contained in:
parent
45922f1903
commit
5012a45cf3
@ -227,7 +227,7 @@ Note that these flags should only appear after a command.
|
||||
If provided, `--local` will move them into the user's `~/Applications`
|
||||
folder instead of the system folder. It may need to be created, first.
|
||||
|
||||
* `ls, list [--unbrewed] [--versions] [--pinned]` [<formulae>]:
|
||||
* `ls, list [--unbrewed] [--versions [--multiple]] [--pinned]` [<formulae>]:
|
||||
Without any arguments, list all installed formulae.
|
||||
|
||||
If <formulae> are given, list the installed files for <formulae>.
|
||||
@ -238,7 +238,8 @@ Note that these flags should only appear after a command.
|
||||
by Homebrew.
|
||||
|
||||
If `--versions` is passed, show the version number for installed formulae,
|
||||
or only the specified formulae if <formulae> are given.
|
||||
or only the specified formulae if <formulae> are given. With `--multiple`,
|
||||
only show formulae with multiple versions installed.
|
||||
|
||||
If `--pinned` is passed, show the versions of pinned formulae, or only the
|
||||
specified (pinned) formulae if <formulae> are given.
|
||||
|
||||
@ -63,6 +63,7 @@ module Homebrew extend self
|
||||
ARGV.named.map{ |n| HOMEBREW_CELLAR+n }.select{ |pn| pn.exist? }
|
||||
end.each do |d|
|
||||
versions = d.children.select{ |pn| pn.directory? }.map{ |pn| pn.basename.to_s }
|
||||
next if ARGV.include?('--multiple') && versions.count < 2
|
||||
puts "#{d.basename} #{versions*' '}"
|
||||
end
|
||||
end
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
.\" generated with Ronn/v0.7.3
|
||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||
.
|
||||
.TH "BREW" "1" "March 2014" "Homebrew" "brew"
|
||||
.TH "BREW" "1" "April 2014" "Homebrew" "brew"
|
||||
.
|
||||
.SH "NAME"
|
||||
\fBbrew\fR \- The missing package manager for OS X
|
||||
@ -242,7 +242,7 @@ Find all installed formulae that have compiled \fB\.app\fR\-style "application"
|
||||
If provided, \fB\-\-local\fR will move them into the user\'s \fB~/Applications\fR folder instead of the system folder\. It may need to be created, first\.
|
||||
.
|
||||
.TP
|
||||
\fBls, list [\-\-unbrewed] [\-\-versions] [\-\-pinned]\fR [\fIformulae\fR]
|
||||
\fBls, list [\-\-unbrewed] [\-\-versions [\-\-multiple]] [\-\-pinned]\fR [\fIformulae\fR]
|
||||
Without any arguments, list all installed formulae\.
|
||||
.
|
||||
.IP
|
||||
@ -252,7 +252,7 @@ If \fIformulae\fR are given, list the installed files for \fIformulae\fR\. Combi
|
||||
If \fB\-\-unbrewed\fR is passed, list all files in the Homebrew prefix not installed by Homebrew\.
|
||||
.
|
||||
.IP
|
||||
If \fB\-\-versions\fR is passed, show the version number for installed formulae, or only the specified formulae if \fIformulae\fR are given\.
|
||||
If \fB\-\-versions\fR is passed, show the version number for installed formulae, or only the specified formulae if \fIformulae\fR are given\. With \fB\-\-multiple\fR, only show formulae with multiple versions installed\.
|
||||
.
|
||||
.IP
|
||||
If \fB\-\-pinned\fR is passed, show the versions of pinned formulae, or only the specified (pinned) formulae if \fIformulae\fR are given\. See also \fBpin\fR, \fBunpin\fR\.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user