diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb index e6dbe345aa..9cfb793344 100644 --- a/Library/Homebrew/dev-cmd/audit.rb +++ b/Library/Homebrew/dev-cmd/audit.rb @@ -55,7 +55,7 @@ module Homebrew def audit_args Homebrew::CLI::Parser.new do usage_banner <<~EOS - `audit` : + `audit` [] : Check for Homebrew coding style violations. This should be run before submitting a new formula. diff --git a/Library/Homebrew/dev-cmd/bottle.rb b/Library/Homebrew/dev-cmd/bottle.rb index 6e5e960dc7..3f43214f02 100644 --- a/Library/Homebrew/dev-cmd/bottle.rb +++ b/Library/Homebrew/dev-cmd/bottle.rb @@ -72,7 +72,7 @@ module Homebrew def bottle_args Homebrew::CLI::Parser.new do usage_banner <<~EOS - `bottle` : + `bottle` [] : Generate a bottle (binary package) from a formula installed with `--build-bottle`. diff --git a/Library/Homebrew/dev-cmd/bump-formula-pr.rb b/Library/Homebrew/dev-cmd/bump-formula-pr.rb index 9755b009a5..2cd9ed86f2 100644 --- a/Library/Homebrew/dev-cmd/bump-formula-pr.rb +++ b/Library/Homebrew/dev-cmd/bump-formula-pr.rb @@ -50,7 +50,7 @@ module Homebrew def bump_formula_pr_args Homebrew::CLI::Parser.new do usage_banner <<~EOS - `bump-formula-pr` : + `bump-formula-pr` [] : Creates a pull request to update the formula with a new URL or a new tag. diff --git a/Library/Homebrew/dev-cmd/create.rb b/Library/Homebrew/dev-cmd/create.rb index 90c81294fa..f5f174f12f 100644 --- a/Library/Homebrew/dev-cmd/create.rb +++ b/Library/Homebrew/dev-cmd/create.rb @@ -30,7 +30,7 @@ module Homebrew def create_args Homebrew::CLI::Parser.new do usage_banner <<~EOS - `create` : + `create` []: Generate a formula for the downloadable file at and open it in the editor. Homebrew will attempt to automatically derive the formula name diff --git a/Library/Homebrew/dev-cmd/irb.rb b/Library/Homebrew/dev-cmd/irb.rb index af24a8a677..816ab6047c 100644 --- a/Library/Homebrew/dev-cmd/irb.rb +++ b/Library/Homebrew/dev-cmd/irb.rb @@ -25,7 +25,7 @@ module Homebrew def irb_args Homebrew::CLI::Parser.new do usage_banner <<~EOS - `irb` : + `irb` []: Enter the interactive Homebrew Ruby shell. EOS diff --git a/Library/Homebrew/dev-cmd/linkage.rb b/Library/Homebrew/dev-cmd/linkage.rb index 6c5f50a669..2feb98f899 100644 --- a/Library/Homebrew/dev-cmd/linkage.rb +++ b/Library/Homebrew/dev-cmd/linkage.rb @@ -22,7 +22,7 @@ module Homebrew def linkage_args Homebrew::CLI::Parser.new do usage_banner <<~EOS - `linkage` : + `linkage` [] : Checks the library links of an installed formula. diff --git a/Library/Homebrew/dev-cmd/man.rb b/Library/Homebrew/dev-cmd/man.rb index 8548c8357c..84f38ceaf0 100644 --- a/Library/Homebrew/dev-cmd/man.rb +++ b/Library/Homebrew/dev-cmd/man.rb @@ -36,7 +36,7 @@ module Homebrew def man_args Homebrew::CLI::Parser.new do usage_banner <<~EOS - `man` : + `man` []: Generate Homebrew's manpages. EOS @@ -157,8 +157,8 @@ module Homebrew odie "Got no output from ronn!" unless ronn_output ronn_output.gsub!(%r{`(?=[.!?,;:]?\s)}, "").gsub!(%r{}, "`") if format_flag == "--markdown" unless format_flag == "--markdown" - ronn_output = ronn_output.gsub(//, "\\fB").gsub(%r{}, "\\fR") - .gsub(//, "\\fI").gsub(%r{}, "\\fR") + ronn_output = ronn_output.gsub(%r{(.*?)}, "\\fB\\1\\fR") + .gsub(%r{(.*?)}, "\\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 diff --git a/Library/Homebrew/dev-cmd/pull.rb b/Library/Homebrew/dev-cmd/pull.rb index 26c597e8e2..7f51c68c4b 100644 --- a/Library/Homebrew/dev-cmd/pull.rb +++ b/Library/Homebrew/dev-cmd/pull.rb @@ -75,7 +75,7 @@ module Homebrew def pull_args Homebrew::CLI::Parser.new do usage_banner <<~EOS - pull : + pull [] : Gets a patch from a GitHub commit or pull request and applies it to Homebrew. Optionally, installs the formulae changed by the patch. diff --git a/Library/Homebrew/dev-cmd/release-notes.rb b/Library/Homebrew/dev-cmd/release-notes.rb index 3ed6b3cd67..8445ee2d58 100644 --- a/Library/Homebrew/dev-cmd/release-notes.rb +++ b/Library/Homebrew/dev-cmd/release-notes.rb @@ -13,7 +13,7 @@ module Homebrew def release_notes_args Homebrew::CLI::Parser.new do usage_banner <<~EOS - `release-notes` : + `release-notes` [] [] []: Output the merged pull requests on Homebrew/brew between two Git refs. If no is provided it defaults to the latest tag. diff --git a/Library/Homebrew/dev-cmd/tests.rb b/Library/Homebrew/dev-cmd/tests.rb index bfe0702d2a..add193d968 100644 --- a/Library/Homebrew/dev-cmd/tests.rb +++ b/Library/Homebrew/dev-cmd/tests.rb @@ -24,7 +24,7 @@ module Homebrew def tests_args Homebrew::CLI::Parser.new do usage_banner <<~EOS - `tests` : + `tests` []: Run Homebrew's unit and integration tests. If provided, `--only=` runs only _spec.rb, and `--seed` diff --git a/Library/Homebrew/dev-cmd/update-test.rb b/Library/Homebrew/dev-cmd/update-test.rb index 9ca8731186..7a1ffef27f 100644 --- a/Library/Homebrew/dev-cmd/update-test.rb +++ b/Library/Homebrew/dev-cmd/update-test.rb @@ -22,7 +22,7 @@ module Homebrew def update_test_args Homebrew::CLI::Parser.new do usage_banner <<~EOS - `update-test` : + `update-test` []: Runs a test of `brew update` with a new repository clone. diff --git a/docs/Manpage.md b/docs/Manpage.md index c5977786e0..c8a5f34ad4 100644 --- a/docs/Manpage.md +++ b/docs/Manpage.md @@ -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. diff --git a/manpages/brew.1 b/manpages/brew.1 index 4eed60923e..1788e230b9 100644 --- a/manpages/brew.1 +++ b/manpages/brew.1 @@ -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