man: Correct option synopsis

This commit is contained in:
Gautham Goli 2018-10-03 10:19:46 +05:30
parent 7b0f27ca39
commit a03d2e0cd1
No known key found for this signature in database
GPG Key ID: 6A9ABBC284468364
13 changed files with 36 additions and 36 deletions

View File

@ -55,7 +55,7 @@ module Homebrew
def audit_args
Homebrew::CLI::Parser.new do
usage_banner <<~EOS
`audit` <options> <formulae>:
`audit` [<options>] <formulae>:
Check <formulae> for Homebrew coding style violations. This should be
run before submitting a new formula.

View File

@ -72,7 +72,7 @@ module Homebrew
def bottle_args
Homebrew::CLI::Parser.new do
usage_banner <<~EOS
`bottle` <options> <formulae>:
`bottle` [<options>] <formulae>:
Generate a bottle (binary package) from a formula installed with
`--build-bottle`.

View File

@ -50,7 +50,7 @@ module Homebrew
def bump_formula_pr_args
Homebrew::CLI::Parser.new do
usage_banner <<~EOS
`bump-formula-pr` <options> <formula>:
`bump-formula-pr` [<options>] <formula>:
Creates a pull request to update the formula with a new URL or a new tag.

View File

@ -30,7 +30,7 @@ module Homebrew
def create_args
Homebrew::CLI::Parser.new do
usage_banner <<~EOS
`create` <URL> <options>:
`create` <URL> [<options>]:
Generate a formula for the downloadable file at <URL> and open it in the editor.
Homebrew will attempt to automatically derive the formula name

View File

@ -25,7 +25,7 @@ module Homebrew
def irb_args
Homebrew::CLI::Parser.new do
usage_banner <<~EOS
`irb` <options>:
`irb` [<options>]:
Enter the interactive Homebrew Ruby shell.
EOS

View File

@ -22,7 +22,7 @@ module Homebrew
def linkage_args
Homebrew::CLI::Parser.new do
usage_banner <<~EOS
`linkage` <options> <formula>:
`linkage` [<options>] <formula>:
Checks the library links of an installed formula.

View File

@ -36,7 +36,7 @@ module Homebrew
def man_args
Homebrew::CLI::Parser.new do
usage_banner <<~EOS
`man` <options>:
`man` [<options>]:
Generate Homebrew's manpages.
EOS
@ -157,8 +157,8 @@ module Homebrew
odie "Got no output from ronn!" unless ronn_output
ronn_output.gsub!(%r{</var>`(?=[.!?,;:]?\s)}, "").gsub!(%r{</?var>}, "`") if format_flag == "--markdown"
unless format_flag == "--markdown"
ronn_output = ronn_output.gsub(/<code>/, "\\fB").gsub(%r{</code>}, "\\fR")
.gsub(/<var>/, "\\fI").gsub(%r{</var>}, "\\fR")
ronn_output = ronn_output.gsub(%r{<code>(.*?)</code>}, "\\fB\\1\\fR")
.gsub(%r{<var>(.*?)</var>}, "\\fI\\1\\fR")
end
target.atomic_write ronn_output
end
@ -187,7 +187,7 @@ module Homebrew
cmd_parser = Homebrew.send(cmd_arg_parser(cmd_path))
man_page_lines << cmd_manpage_lines(cmd_parser).join
rescue NoMethodError
man_page_lines << path_glob_commands(cmd_path.to_s)[0]
man_page_lines << path_glob_commands(cmd_path.to_s).first
end
end
man_page_lines

View File

@ -75,7 +75,7 @@ module Homebrew
def pull_args
Homebrew::CLI::Parser.new do
usage_banner <<~EOS
pull <options> <formula>:
pull [<options>] <formula>:
Gets a patch from a GitHub commit or pull request and applies it to Homebrew.
Optionally, installs the formulae changed by the patch.

View File

@ -13,7 +13,7 @@ module Homebrew
def release_notes_args
Homebrew::CLI::Parser.new do
usage_banner <<~EOS
`release-notes` <previous_tag> <end_ref>:
`release-notes` [<options>] [<previous_tag>] [<end_ref>]:
Output the merged pull requests on Homebrew/brew between two Git refs.
If no <previous_tag> is provided it defaults to the latest tag.

View File

@ -24,7 +24,7 @@ module Homebrew
def tests_args
Homebrew::CLI::Parser.new do
usage_banner <<~EOS
`tests` <options> <formula>:
`tests` [<options>]:
Run Homebrew's unit and integration tests. If provided,
`--only=`<test_script> runs only <test_script>_spec.rb, and `--seed`

View File

@ -22,7 +22,7 @@ module Homebrew
def update_test_args
Homebrew::CLI::Parser.new do
usage_banner <<~EOS
`update-test` <options>:
`update-test` [<options>]:
Runs a test of `brew update` with a new repository clone.

View File

@ -663,7 +663,7 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note
## DEVELOPER COMMANDS
###`audit` `options` `formulae`:
###`audit` [`options`] `formulae`:
Check `formulae` for Homebrew coding style violations. This should be
run before submitting a new formula.
@ -692,7 +692,7 @@ Passing `--only-cops`=`cops` will check for violations of only the listed RuboCo
* `--except-cops`:
Passing `--except-cops`=`cops` will skip checking the listed RuboCop cops violations. `cops` should be a comma-separated list of cop names.
###`bottle` `options` `formulae`:
###`bottle` [`options`] `formulae`:
Generate a bottle (binary package) from a formula installed with
`--build-bottle`.
@ -721,7 +721,7 @@ Write bottle information to a JSON file, which can be used as the argument for `
* `--root-url`:
Use the specified `URL` as the root of the bottle's URL instead of Homebrew's default.
###`bump-formula-pr` `options` `formula`:
###`bump-formula-pr` [`options`] `formula`:
Creates a pull request to update the formula with a new URL or a new tag.
@ -764,7 +764,7 @@ Use the provided `version` to override the value parsed from the URL or tag. Not
* `--message`:
Append provided `message` to the default PR message.
###`create` `URL` `options`:
###`create` `URL` [`options`]:
Generate a formula for the downloadable file at `URL` and open it in the editor.
Homebrew will attempt to automatically derive the formula name
@ -799,7 +799,7 @@ Takes a tap [`user``/``repo`] as argument and generates the formula in the speci
Display the path where `formula` is located.
###`irb` `options`:
###`irb` [`options`]:
Enter the interactive Homebrew Ruby shell.
@ -808,7 +808,7 @@ Show several examples.
* `--pry`:
Pry will be used instead of irb if `--pry` is passed or HOMEBREW_PRY is set.
###`linkage` `options` `formula`:
###`linkage` [`options`] `formula`:
Checks the library links of an installed formula.
@ -822,7 +822,7 @@ Print the dylib followed by the binaries which link to it for each library the k
* `--cached`:
Print the cached linkage values stored in HOMEBREW_CACHE, set from a previous `brew linkage` run.
###`man` `options`:
###`man` [`options`]:
Generate Homebrew's manpages.
@ -841,7 +841,7 @@ Reuploads the stable URL for a formula to Bintray to use it as a mirror.
For example:
brew prof readall
###pull `options` `formula`:
###pull [`options`] `formula`:
Gets a patch from a GitHub commit or pull request and applies it to Homebrew.
Optionally, installs the formulae changed by the patch.
@ -882,7 +882,7 @@ Publish at the given Bintray organisation.
* `--test-bot-user`:
Pull the bottle block commit from the specified user on GitHub.
###`release-notes` `previous_tag` `end_ref`:
###`release-notes` [`options`] [`previous_tag`] [`end_ref`]:
Output the merged pull requests on Homebrew/brew between two Git refs.
If no `previous_tag` is provided it defaults to the latest tag.
@ -917,7 +917,7 @@ Generate the template files for a new tap.
Example: `brew install jruby && brew test jruby`
###`tests` `options` `formula`:
###`tests` [`options`]:
Run Homebrew's unit and integration tests. If provided,
`--only=``test_script` runs only `test_script`_spec.rb, and `--seed`
@ -936,7 +936,7 @@ Run only `test_script`_spec.rb
* `--seed`:
Randomizes tests with the provided value instead of a random seed.
###`update-test` `options`:
###`update-test` [`options`]:
Runs a test of `brew update` with a new repository clone.

View File

@ -621,7 +621,7 @@ If \fB\-\-force\fR (or \fB\-f\fR) is specified then always do a slower, full upd
.
.SH "DEVELOPER COMMANDS"
.
.SS "\fBaudit\fR \fIoptions\fR \fIformulae\fR:"
.SS "\fBaudit\fR [\fIoptions\fR] \fIformulae\fR:"
Check \fIformulae\fR for Homebrew coding style violations\. This should be run before submitting a new formula\. If no \fIformulae\fR are provided, all of them are checked\.
.
.TP
@ -668,7 +668,7 @@ Passing \fB\-\-only\-cops\fR=\fIcops\fR will check for violations of only the li
\fB\-\-except\-cops\fR
Passing \fB\-\-except\-cops\fR=\fIcops\fR will skip checking the listed RuboCop cops violations\. \fBcops\fR should be a comma\-separated list of cop names\.
.
.SS "\fBbottle\fR \fIoptions\fR \fIformulae\fR:"
.SS "\fBbottle\fR [\fIoptions\fR] \fIformulae\fR:"
Generate a bottle (binary package) from a formula installed with \fB\-\-build\-bottle\fR\. If the formula specifies a rebuild version, it will be incremented in the generated DSL\. Passing \fB\-\-keep\-old\fR will attempt to keep it at its original value, while \fB\-\-no\-rebuild\fR will remove it\.
.
.TP
@ -711,7 +711,7 @@ Write bottle information to a JSON file, which can be used as the argument for \
\fB\-\-root\-url\fR
Use the specified \fIURL\fR as the root of the bottle\'s URL instead of Homebrew\'s default\.
.
.SS "\fBbump\-formula\-pr\fR \fIoptions\fR \fIformula\fR:"
.SS "\fBbump\-formula\-pr\fR [\fIoptions\fR] \fIformula\fR:"
Creates a pull request to update the formula with a new URL or a new tag\.
.
.P
@ -778,7 +778,7 @@ Use the provided \fIversion\fR to override the value parsed from the URL or tag\
\fB\-\-message\fR
Append provided \fImessage\fR to the default PR message\.
.
.SS "\fBcreate\fR \fIURL\fR \fIoptions\fR:"
.SS "\fBcreate\fR \fIURL\fR [\fIoptions\fR]:"
Generate a formula for the downloadable file at \fIURL\fR and open it in the editor\. Homebrew will attempt to automatically derive the formula name and version, but if it fails, you\'ll have to make your own template\. The \fBwget\fR formula serves as a simple example\. For the complete API have a look at \fIhttp://www\.rubydoc\.info/github/Homebrew/brew/master/Formula\fR\.
.
.TP
@ -819,7 +819,7 @@ Open \fIformula\fR in the editor\. Open all of Homebrew for editing if no \fIfor
.SS "\fBformula\fR \fIformula\fR:"
Display the path where \fIformula\fR is located\.
.
.SS "\fBirb\fR \fIoptions\fR:"
.SS "\fBirb\fR [\fIoptions\fR]:"
Enter the interactive Homebrew Ruby shell\.
.
.TP
@ -830,7 +830,7 @@ Show several examples\.
\fB\-\-pry\fR
Pry will be used instead of irb if \fB\-\-pry\fR is passed or HOMEBREW_PRY is set\.
.
.SS "\fBlinkage\fR \fIoptions\fR \fIformula\fR:"
.SS "\fBlinkage\fR [\fIoptions\fR] \fIformula\fR:"
Checks the library links of an installed formula\.
.
.P
@ -848,7 +848,7 @@ Print the dylib followed by the binaries which link to it for each library the k
\fB\-\-cached\fR
Print the cached linkage values stored in HOMEBREW_CACHE, set from a previous \fBbrew linkage\fR run\.
.
.SS "\fBman\fR \fIoptions\fR:"
.SS "\fBman\fR [\fIoptions\fR]:"
Generate Homebrew\'s manpages\.
.
.TP
@ -866,7 +866,7 @@ Reuploads the stable URL for a formula to Bintray to use it as a mirror\.
\fBprof\fR [\fIruby options\fR]
Run Homebrew with the Ruby profiler\. For example: brew prof readall
.
.SS "pull \fIoptions\fR \fIformula\fR:"
.SS "pull [\fIoptions\fR] \fIformula\fR:"
Gets a patch from a GitHub commit or pull request and applies it to Homebrew\. Optionally, installs the formulae changed by the patch\.
.
.P
@ -928,7 +928,7 @@ Publish at the given Bintray organisation\.
\fB\-\-test\-bot\-user\fR
Pull the bottle block commit from the specified user on GitHub\.
.
.SS "\fBrelease\-notes\fR \fIprevious_tag\fR \fIend_ref\fR:"
.SS "\fBrelease\-notes\fR [\fIoptions\fR] [\fIprevious_tag\fR] [\fIend_ref\fR]:"
Output the merged pull requests on Homebrew/brew between two Git refs\. If no \fIprevious_tag\fR is provided it defaults to the latest tag\. If no \fIend_ref\fR is provided it defaults to \fBorigin/master\fR\.
.
.TP
@ -958,7 +958,7 @@ If \fB\-\-keep\-tmp\fR is passed, the temporary files created for the test are n
.IP
Example: \fBbrew install jruby && brew test jruby\fR
.
.SS "\fBtests\fR \fIoptions\fR \fIformula\fR:"
.SS "\fBtests\fR [\fIoptions\fR]:"
Run Homebrew\'s unit and integration tests\. If provided, \fB\-\-only=\fR\fItest_script\fR runs only \fItest_script\fR_spec\.rb, and \fB\-\-seed\fR randomizes tests with the provided value instead of a random seed\.
.
.TP
@ -985,7 +985,7 @@ Run only \fItest_script\fR_spec\.rb
\fB\-\-seed\fR
Randomizes tests with the provided value instead of a random seed\.
.
.SS "\fBupdate\-test\fR \fIoptions\fR:"
.SS "\fBupdate\-test\fR [\fIoptions\fR]:"
Runs a test of \fBbrew update\fR with a new repository clone\.
.
.P