From f60582ca48006b2eff67021a67fed2a1020c03bc Mon Sep 17 00:00:00 2001 From: Gautham Goli Date: Tue, 2 Oct 2018 18:50:59 +0530 Subject: [PATCH] man: Remove [] from command synopsis --- Library/Homebrew/dev-cmd/audit.rb | 2 +- Library/Homebrew/dev-cmd/bottle.rb | 2 +- Library/Homebrew/dev-cmd/bump-formula-pr.rb | 2 +- Library/Homebrew/dev-cmd/create.rb | 2 +- Library/Homebrew/dev-cmd/irb.rb | 2 +- Library/Homebrew/dev-cmd/linkage.rb | 2 +- Library/Homebrew/dev-cmd/man.rb | 6 ++---- Library/Homebrew/dev-cmd/pull.rb | 2 +- Library/Homebrew/dev-cmd/release-notes.rb | 2 +- Library/Homebrew/dev-cmd/tests.rb | 2 +- Library/Homebrew/dev-cmd/update-test.rb | 2 +- docs/Manpage.md | 22 ++++++++++----------- manpages/brew.1 | 22 ++++++++++----------- 13 files changed, 34 insertions(+), 36 deletions(-) diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb index 461c770d4a..e6dbe345aa 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` [`options`] []: + `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 908d71f1f9..6e5e960dc7 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 89b616d037..8b7aae6c98 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 f5f174f12f..90c81294fa 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 486970c774..4638d302c9 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 2feb98f899..6c5f50a669 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 17808cc92e..177dd8fb98 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 @@ -226,8 +226,6 @@ module Homebrew end def format_usage_banner(usage_banner) - synopsis, *remaining_lines = usage_banner.split('\n') - synopsis = synopsis.sub(/^/, "###") - [synopsis, *remaining_lines].join("\n") + usage_banner.sub(/^/, "###") end end diff --git a/Library/Homebrew/dev-cmd/pull.rb b/Library/Homebrew/dev-cmd/pull.rb index 07497540b5..a1a35d51df 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 [`options`] []: + 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 6eb8d19bec..3ed6b3cd67 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 5730c7cab7..bfe0702d2a 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 6f3ca832bf..9ca8731186 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` [options]: + `update-test` : Runs a test of `brew update` with a new repository clone. diff --git a/docs/Manpage.md b/docs/Manpage.md index bda0afc00a..e80ac95c32 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. @@ -840,7 +840,7 @@ Reuploads the stable URL for a formula to Bintray to use it as a mirror. Run Homebrew with the Ruby profiler. For example: -###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. @@ -881,7 +881,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` `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. @@ -916,7 +916,7 @@ Generate the template files for a new tap. Example: `brew install jruby && brew test jruby` -###`tests` [`options`] `formula`: +###`tests` `options` `formula`: Run Homebrew's unit and integration tests. If provided, `--only=``test_script` runs only `test_script`_spec.rb, and `--seed` @@ -935,7 +935,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 c2f3eb06d8..9f5c57ff9e 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 [\fBoptions\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 [ruby options] Run Homebrew with the Ruby profiler\. For example: . -.SS "pull [\fBoptions\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 \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 \fIformula\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 [options]:" +.SS "\fBupdate\-test\fR \fIoptions\fR:" Runs a test of \fBbrew update\fR with a new repository clone\. . .P