Skip to content
Snippets Groups Projects
Commit 56ac7ed5 authored by Mike Miller's avatar Mike Miller
Browse files

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.
parent a4c8fc74
No related branches found
No related tags found
No related merge requests found
......@@ -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\.
.
......
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