diff --git a/Library/Contributions/manpages/brew.1.md b/Library/Contributions/manpages/brew.1.md index 22d8dbf8f0..f3b86747da 100644 --- a/Library/Contributions/manpages/brew.1.md +++ b/Library/Contributions/manpages/brew.1.md @@ -160,16 +160,15 @@ Note that these flags should only appear after a command. To view formula history locally: `brew log -p `. - * `info --json=` (--all|--installed|): - Print a JSON representation of . Currently the only accepted value + * `info --json=` (--all|--installed|): + Print a JSON representation of . Currently the only accepted value for is `v1`. Pass `--all` to get information on all formulae, or `--installed` to get information on all installed formulae. - If a single formula is specified, a single JSON object is displayed. - If multiple formulae are specified, or `--installed` or `--all` are used, - a JSON array is displayed, even if the array would only contain one object. + See the wiki for examples of using the JSON: + * `install [--debug] [--env=] [--ignore-dependencies] [--only-dependencies] [--cc=] [--build-from-source] [--devel|--HEAD]` : Install . diff --git a/Library/Homebrew/cmd/info.rb b/Library/Homebrew/cmd/info.rb index ef8e2ac528..7063fd60c1 100644 --- a/Library/Homebrew/cmd/info.rb +++ b/Library/Homebrew/cmd/info.rb @@ -49,11 +49,7 @@ module Homebrew extend self ARGV.formulae end json = ff.map {|f| f.to_hash} - if json.size == 1 - puts Utils::JSON.dump(json.pop) - else - puts Utils::JSON.dump(json) - end + puts Utils::JSON.dump(json) end def github_fork diff --git a/share/man/man1/brew.1 b/share/man/man1/brew.1 index 9c8aeffa1e..41ef8d326b 100644 --- a/share/man/man1/brew.1 +++ b/share/man/man1/brew.1 @@ -177,14 +177,14 @@ Open a browser to the GitHub History page for formula \fIformula\fR\. To view formula history locally: \fBbrew log \-p \fR\. . .TP -\fBinfo \-\-json=\fR (\-\-all|\-\-installed|\fIformula\fR) -Print a JSON representation of \fIformula\fR\. Currently the only accepted value for \fIversion\fR is \fBv1\fR\. +\fBinfo \-\-json=\fR (\-\-all|\-\-installed|\fIformulae\fR) +Print a JSON representation of \fIformulae\fR\. Currently the only accepted value for \fIversion\fR is \fBv1\fR\. . .IP Pass \fB\-\-all\fR to get information on all formulae, or \fB\-\-installed\fR to get information on all installed formulae\. . .IP -If a single formula is specified, a single JSON object is displayed\. If multiple formulae are specified, or \fB\-\-installed\fR or \fB\-\-all\fR are used, a JSON array is displayed, even if the array would only contain one object\. +See the wiki for examples of using the JSON: \fIhttps://github\.com/Homebrew/homebrew/wiki/Querying\-Brew\fR . .TP \fBinstall [\-\-debug] [\-\-env=] [\-\-ignore\-dependencies] [\-\-only\-dependencies] [\-\-cc=] [\-\-build\-from\-source] [\-\-devel|\-\-HEAD]\fR \fIformula\fR