Skip to content
Snippets Groups Projects
Commit 3ed9b35f authored by EricFromCanada's avatar EricFromCanada
Browse files

man: allow multi-line paragraphs for comment-based docs

parent a9d1457c
No related branches found
No related tags found
No related merge requests found
...@@ -196,8 +196,11 @@ module Homebrew ...@@ -196,8 +196,11 @@ module Homebrew
lines = [format_usage_banner(comment_lines.first).chomp] lines = [format_usage_banner(comment_lines.first).chomp]
comment_lines.slice(1..-1) comment_lines.slice(1..-1)
.each do |line| .each do |line|
line = line.slice(4..-1) line = line.slice(4..-2)
next unless line unless line
lines.last << "\n"
next
end
# Omit the common global_options documented separately in the man page. # Omit the common global_options documented separately in the man page.
next if line =~ /--(debug|force|help|quiet|verbose) / next if line =~ /--(debug|force|help|quiet|verbose) /
...@@ -206,6 +209,7 @@ module Homebrew ...@@ -206,6 +209,7 @@ module Homebrew
lines << line.gsub(/^ +(-+[a-z-]+), (-+[a-z-]+) +/, "* `\\1`, `\\2`:\n ") lines << line.gsub(/^ +(-+[a-z-]+), (-+[a-z-]+) +/, "* `\\1`, `\\2`:\n ")
.gsub(/^ +(-+[a-z-]+) +/, "* `\\1`:\n ") .gsub(/^ +(-+[a-z-]+) +/, "* `\\1`:\n ")
end end
lines.last << "\n"
lines lines
end end
......
...@@ -423,11 +423,11 @@ build systems would not find otherwise. ...@@ -423,11 +423,11 @@ build systems would not find otherwise.
Use the standard `PATH` instead of superenv's when `std` is passed. Use the standard `PATH` instead of superenv's when `std` is passed.
### `shellenv` ### `shellenv`
Print export statements. When run in a shell, this installation of Homebrew will be added to your `PATH`, `MANPATH`, and `INFOPATH`. Print export statements. When run in a shell, this installation of Homebrew will be added to your `PATH`, `MANPATH`, and `INFOPATH`.
The variables `HOMEBREW_PREFIX`, `HOMEBREW_CELLAR` and `HOMEBREW_REPOSITORY` are also exported to avoid querying them multiple times. The variables `HOMEBREW_PREFIX`, `HOMEBREW_CELLAR` and `HOMEBREW_REPOSITORY` are also exported to avoid querying them multiple times.
Consider adding evaluation of this command's output to your dotfiles (e.g. `~/.profile` or `~/.zprofile`) with: `eval $(brew shellenv)`
Consider adding evaluation of this command's output to your dotfiles (e.g. `~/.profile`) with: `eval $(brew shellenv)`
### `style` [*`options`*] [*`file`*|*`tap`*|*`formula`*] ### `style` [*`options`*] [*`file`*|*`tap`*|*`formula`*]
...@@ -527,12 +527,14 @@ also `pin`. ...@@ -527,12 +527,14 @@ also `pin`.
Remove a tapped formula repository. Remove a tapped formula repository.
### `update`, `up` [*`options`*] ### `update`, `up` [*`options`*]
Fetch the newest version of Homebrew and all formulae from GitHub using `git`(1) and perform any necessary migrations. Fetch the newest version of Homebrew and all formulae from GitHub using `git`(1) and perform any necessary migrations.
* `--merge`: * `--merge`:
Use `git merge` to apply updates (rather than `git rebase`). Use `git merge` to apply updates (rather than `git rebase`).
### `update-reset` [*`repository`*] ### `update-reset` [*`repository`*]
Fetch and reset Homebrew and all tap repositories (or any specified *`repository`*) using `git`(1) to their latest `origin/master`. Fetch and reset Homebrew and all tap repositories (or any specified *`repository`*) using `git`(1) to their latest `origin/master`.
*Note:* this will destroy all your uncommitted or committed changes. *Note:* this will destroy all your uncommitted or committed changes.
......
...@@ -530,10 +530,7 @@ Use the standard \fBPATH\fR instead of superenv\'s when \fBstd\fR is passed\. ...@@ -530,10 +530,7 @@ Use the standard \fBPATH\fR instead of superenv\'s when \fBstd\fR is passed\.
Print export statements\. When run in a shell, this installation of Homebrew will be added to your \fBPATH\fR, \fBMANPATH\fR, and \fBINFOPATH\fR\. Print export statements\. When run in a shell, this installation of Homebrew will be added to your \fBPATH\fR, \fBMANPATH\fR, and \fBINFOPATH\fR\.
. .
.P .P
The variables \fBHOMEBREW_PREFIX\fR, \fBHOMEBREW_CELLAR\fR and \fBHOMEBREW_REPOSITORY\fR are also exported to avoid querying them multiple times\. The variables \fBHOMEBREW_PREFIX\fR, \fBHOMEBREW_CELLAR\fR and \fBHOMEBREW_REPOSITORY\fR are also exported to avoid querying them multiple times\. Consider adding evaluation of this command\'s output to your dotfiles (e\.g\. \fB~/\.profile\fR or \fB~/\.zprofile\fR) with: \fBeval $(brew shellenv)\fR
.
.P
Consider adding evaluation of this command\'s output to your dotfiles (e\.g\. \fB~/\.profile\fR) with: \fBeval $(brew shellenv)\fR
. .
.SS "\fBstyle\fR [\fIoptions\fR] [\fIfile\fR|\fItap\fR|\fIformula\fR]" .SS "\fBstyle\fR [\fIoptions\fR] [\fIfile\fR|\fItap\fR|\fIformula\fR]"
Check formulae or files for conformance to Homebrew style guidelines\. Check formulae or files for conformance to Homebrew style guidelines\.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment