Merge pull request #7831 from EricFromCanada/fix-help-output

docs: fixes for help output
This commit is contained in:
Eric Knibbe 2020-06-25 13:08:48 -04:00 committed by GitHub
commit db998860f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 34 additions and 34 deletions

View File

@ -22,9 +22,9 @@ module Homebrew
switch "--force-bottle", switch "--force-bottle",
description: "Show the cache file used when pouring a bottle." description: "Show the cache file used when pouring a bottle."
switch "--formula", switch "--formula",
description: "Show cache files for only formulae" description: "Only show cache files for formulae."
switch "--cask", switch "--cask",
description: "Show cache files for only casks" description: "Only show cache files for casks."
conflicts "--build-from-source", "--force-bottle" conflicts "--build-from-source", "--force-bottle"
conflicts "--formula", "--cask" conflicts "--formula", "--cask"
end end

View File

@ -14,9 +14,9 @@ module Homebrew
Reupload the stable URL of a formula to Bintray for use as a mirror. Reupload the stable URL of a formula to Bintray for use as a mirror.
EOS EOS
flag "--bintray-org=", flag "--bintray-org=",
description: "Upload to the specified Bintray organisation (default: homebrew)." description: "Upload to the specified Bintray organisation (default: `homebrew`)."
flag "--bintray-repo=", flag "--bintray-repo=",
description: "Upload to the specified Bintray repository (default: mirror)." description: "Upload to the specified Bintray repository (default: `mirror`)."
switch "--no-publish", switch "--no-publish",
description: "Upload to Bintray, but don't publish." description: "Upload to Bintray, but don't publish."
switch :verbose switch :verbose

View File

@ -34,18 +34,18 @@ module Homebrew
description: "When a patch fails to apply, leave in progress and allow user to resolve, "\ description: "When a patch fails to apply, leave in progress and allow user to resolve, "\
"instead of aborting." "instead of aborting."
flag "--workflow=", flag "--workflow=",
description: "Retrieve artifacts from the specified workflow (default: tests.yml)." description: "Retrieve artifacts from the specified workflow (default: `tests.yml`)."
flag "--artifact=", flag "--artifact=",
description: "Download artifacts with the specified name (default: bottles)." description: "Download artifacts with the specified name (default: `bottles`)."
flag "--bintray-org=", flag "--bintray-org=",
description: "Upload to the specified Bintray organisation (default: homebrew)." description: "Upload to the specified Bintray organisation (default: `homebrew`)."
flag "--tap=", flag "--tap=",
description: "Target tap repository (default: homebrew/core)." description: "Target tap repository (default: `homebrew/core`)."
flag "--root-url=", flag "--root-url=",
description: "Use the specified <URL> as the root of the bottle's URL instead of Homebrew's default." description: "Use the specified <URL> as the root of the bottle's URL instead of Homebrew's default."
flag "--bintray-mirror=", flag "--bintray-mirror=",
description: "Use the specified Bintray repository to automatically mirror stable URLs "\ description: "Use the specified Bintray repository to automatically mirror stable URLs "\
"defined in the formulae (default: mirror)" "defined in the formulae (default: `mirror`)."
switch :verbose switch :verbose
switch :debug switch :debug
min_named 1 min_named 1

View File

@ -15,10 +15,10 @@ module Homebrew
EOS EOS
switch "--no-publish", switch "--no-publish",
description: "Apply the bottle commit and upload the bottles, but don't publish them." description: "Apply the bottle commit and upload the bottles, but don't publish them."
switch "--dry-run", "-n", switch "-n", "--dry-run",
description: "Print what would be done rather than doing it." description: "Print what would be done rather than doing it."
flag "--bintray-org=", flag "--bintray-org=",
description: "Upload to the specified Bintray organisation (default: homebrew)." description: "Upload to the specified Bintray organisation (default: `homebrew`)."
flag "--root-url=", flag "--root-url=",
description: "Use the specified <URL> as the root of the bottle's URL instead of Homebrew's default." description: "Use the specified <URL> as the root of the bottle's URL instead of Homebrew's default."
switch :verbose switch :verbose

View File

@ -103,7 +103,7 @@ module Homebrew
help_lines = command_help_lines(path) help_lines = command_help_lines(path)
return if help_lines.blank? return if help_lines.blank?
Formatter.wrap(help_lines.join.delete_prefix(" "), COMMAND_DESC_WIDTH) Formatter.wrap(help_lines.join, COMMAND_DESC_WIDTH)
.sub("@hide_from_man_page ", "") .sub("@hide_from_man_page ", "")
.sub(/^\* /, "#{Tty.bold}Usage: brew#{Tty.reset} ") .sub(/^\* /, "#{Tty.bold}Usage: brew#{Tty.reset} ")
.gsub(/`(.*?)`/m, "#{Tty.bold}\\1#{Tty.reset}") .gsub(/`(.*?)`/m, "#{Tty.bold}\\1#{Tty.reset}")

View File

@ -497,7 +497,7 @@ module Kernel
path.read path.read
.lines .lines
.grep(/^#:/) .grep(/^#:/)
.map { |line| line.slice(2..-1) } .map { |line| line.slice(2..-1).delete_prefix(" ") }
end end
def redact_secrets(input, secrets) def redact_secrets(input, secrets)

View File

@ -588,9 +588,9 @@ If *`formula`* is provided, display the file or directory used to cache *`formul
* `--force-bottle`: * `--force-bottle`:
Show the cache file used when pouring a bottle. Show the cache file used when pouring a bottle.
* `--formula`: * `--formula`:
Show cache files for only formulae Only show cache files for formulae.
* `--cask`: * `--cask`:
Show cache files for only casks Only show cache files for casks.
### `--cellar` [*`formula`*] ### `--cellar` [*`formula`*]
@ -900,17 +900,17 @@ repository.
* `--resolve`: * `--resolve`:
When a patch fails to apply, leave in progress and allow user to resolve, instead of aborting. When a patch fails to apply, leave in progress and allow user to resolve, instead of aborting.
* `--workflow`: * `--workflow`:
Retrieve artifacts from the specified workflow (default: tests.yml). Retrieve artifacts from the specified workflow (default: `tests.yml`).
* `--artifact`: * `--artifact`:
Download artifacts with the specified name (default: bottles). Download artifacts with the specified name (default: `bottles`).
* `--bintray-org`: * `--bintray-org`:
Upload to the specified Bintray organisation (default: homebrew). Upload to the specified Bintray organisation (default: `homebrew`).
* `--tap`: * `--tap`:
Target tap repository (default: homebrew/core). Target tap repository (default: `homebrew/core`).
* `--root-url`: * `--root-url`:
Use the specified *`URL`* as the root of the bottle's URL instead of Homebrew's default. Use the specified *`URL`* as the root of the bottle's URL instead of Homebrew's default.
* `--bintray-mirror`: * `--bintray-mirror`:
Use the specified Bintray repository to automatically mirror stable URLs defined in the formulae (default: mirror) Use the specified Bintray repository to automatically mirror stable URLs defined in the formulae (default: `mirror`).
### `pr-upload` [*`options`*] ### `pr-upload` [*`options`*]
@ -921,7 +921,7 @@ Apply the bottle commit and publish bottles to Bintray.
* `-n`, `--dry-run`: * `-n`, `--dry-run`:
Print what would be done rather than doing it. Print what would be done rather than doing it.
* `--bintray-org`: * `--bintray-org`:
Upload to the specified Bintray organisation (default: homebrew). Upload to the specified Bintray organisation (default: `homebrew`).
* `--root-url`: * `--root-url`:
Use the specified *`URL`* as the root of the bottle's URL instead of Homebrew's default. Use the specified *`URL`* as the root of the bottle's URL instead of Homebrew's default.

View File

@ -765,11 +765,11 @@ Show the cache file used when pouring a bottle\.
. .
.TP .TP
\fB\-\-formula\fR \fB\-\-formula\fR
Show cache files for only formulae Only show cache files for formulae\.
. .
.TP .TP
\fB\-\-cask\fR \fB\-\-cask\fR
Show cache files for only casks Only show cache files for casks\.
. .
.SS "\fB\-\-cellar\fR [\fIformula\fR]" .SS "\fB\-\-cellar\fR [\fIformula\fR]"
Display Homebrew\'s Cellar path\. \fIDefault:\fR \fB$(brew \-\-prefix)/Cellar\fR, or if that directory doesn\'t exist, \fB$(brew \-\-repository)/Cellar\fR\. Display Homebrew\'s Cellar path\. \fIDefault:\fR \fB$(brew \-\-prefix)/Cellar\fR, or if that directory doesn\'t exist, \fB$(brew \-\-repository)/Cellar\fR\.
@ -1169,19 +1169,19 @@ When a patch fails to apply, leave in progress and allow user to resolve, instea
. .
.TP .TP
\fB\-\-workflow\fR \fB\-\-workflow\fR
Retrieve artifacts from the specified workflow (default: tests\.yml)\. Retrieve artifacts from the specified workflow (default: \fBtests\.yml\fR)\.
. .
.TP .TP
\fB\-\-artifact\fR \fB\-\-artifact\fR
Download artifacts with the specified name (default: bottles)\. Download artifacts with the specified name (default: \fBbottles\fR)\.
. .
.TP .TP
\fB\-\-bintray\-org\fR \fB\-\-bintray\-org\fR
Upload to the specified Bintray organisation (default: homebrew)\. Upload to the specified Bintray organisation (default: \fBhomebrew\fR)\.
. .
.TP .TP
\fB\-\-tap\fR \fB\-\-tap\fR
Target tap repository (default: homebrew/core)\. Target tap repository (default: \fBhomebrew/core\fR)\.
. .
.TP .TP
\fB\-\-root\-url\fR \fB\-\-root\-url\fR
@ -1189,7 +1189,7 @@ Use the specified \fIURL\fR as the root of the bottle\'s URL instead of Homebrew
. .
.TP .TP
\fB\-\-bintray\-mirror\fR \fB\-\-bintray\-mirror\fR
Use the specified Bintray repository to automatically mirror stable URLs defined in the formulae (default: mirror) Use the specified Bintray repository to automatically mirror stable URLs defined in the formulae (default: \fBmirror\fR)\.
. .
.SS "\fBpr\-upload\fR [\fIoptions\fR]" .SS "\fBpr\-upload\fR [\fIoptions\fR]"
Apply the bottle commit and publish bottles to Bintray\. Apply the bottle commit and publish bottles to Bintray\.
@ -1204,7 +1204,7 @@ Print what would be done rather than doing it\.
. .
.TP .TP
\fB\-\-bintray\-org\fR \fB\-\-bintray\-org\fR
Upload to the specified Bintray organisation (default: homebrew)\. Upload to the specified Bintray organisation (default: \fBhomebrew\fR)\.
. .
.TP .TP
\fB\-\-root\-url\fR \fB\-\-root\-url\fR