man: omit global options from shell command usage
When reading the comment header of a shell command, omit options that are in Homebrew::CLI::Parser.global_options, since they are documented separately for all commands.
This commit is contained in:
parent
a4c8fc74f7
commit
56ac7ed58b
@ -195,6 +195,9 @@ module Homebrew
|
||||
line = line.slice(4..-1)
|
||||
next unless line
|
||||
|
||||
# Omit the common global_options documented separately in the man page.
|
||||
next if line =~ /--(debug|force|help|quiet|verbose) /
|
||||
|
||||
# Format one option or a comma-separated pair of short and long options.
|
||||
lines << line.gsub(/^ +(-+[a-z-]+), (-+[a-z-]+) +/, "* `\\1`, `\\2`:\n ")
|
||||
.gsub(/^ +(-+[a-z-]+) +/, "* `\\1`:\n ")
|
||||
|
@ -540,9 +540,6 @@ Fetch the newest version of Homebrew and all formulae from GitHub using `git`(1)
|
||||
* `--merge`:
|
||||
`git merge` is used to include updates (rather than `git rebase`).
|
||||
|
||||
* `--force`:
|
||||
Always do a slower, full update check (even if unnecessary).
|
||||
|
||||
### `update-reset` [*`repository`*]
|
||||
Fetches and resets 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.
|
||||
|
||||
|
@ -660,10 +660,6 @@ Fetch the newest version of Homebrew and all formulae from GitHub using \fBgit\f
|
||||
\fB\-\-merge\fR
|
||||
\fBgit merge\fR is used to include updates (rather than \fBgit rebase\fR)\.
|
||||
.
|
||||
.TP
|
||||
\fB\-\-force\fR
|
||||
Always do a slower, full update check (even if unnecessary)\.
|
||||
.
|
||||
.SS "\fBupdate\-reset\fR [\fIrepository\fR]"
|
||||
Fetches and resets Homebrew and all tap repositories (or any specified \fBrepository\fR) using \fBgit\fR(1) to their latest \fBorigin/master\fR\. Note this will destroy all your uncommitted or committed changes\.
|
||||
.
|
||||
|
Loading…
x
Reference in New Issue
Block a user