diff --git a/Library/Homebrew/cli/parser.rb b/Library/Homebrew/cli/parser.rb index 9fc4ad3300..93eb6cb588 100644 --- a/Library/Homebrew/cli/parser.rb +++ b/Library/Homebrew/cli/parser.rb @@ -122,7 +122,7 @@ module Homebrew @args = Homebrew::CLI::Args.new - @command_name = caller_locations(2, 1).first.label.chomp("_args") + @command_name = caller_locations(2, 1).first.label.chomp("_args").tr("_", "-") @constraints = [] @conflicts = [] @@ -449,12 +449,12 @@ module Homebrew }.freeze def generate_usage_banner - command_names = ["`#{@command_name.tr("_", "-")}`"] + command_names = ["`#{@command_name}`"] aliases_to_skip = %w[instal uninstal] command_names += Commands::HOMEBREW_INTERNAL_COMMAND_ALIASES.map do |command_alias, command| next if aliases_to_skip.include? command_alias - "`#{command_alias.tr("_", "-")}`" if command == @command_name + "`#{command_alias}`" if command == @command_name end.compact.sort options = if @non_global_processed_options.empty? diff --git a/docs/Manpage.md b/docs/Manpage.md index eeb8de30cd..9c1403206c 100644 --- a/docs/Manpage.md +++ b/docs/Manpage.md @@ -711,7 +711,7 @@ that directory doesn't exist, `$(brew --repository)/Cellar`. If *`formula`* is provided, display the location in the Cellar where *`formula`* would be installed, without any sort of versioned directory as the last path. -### `--env` [*`--shell`*`=`] [*`--plain`*] [*`formula`* ...] +### `--env`, `environment` [*`--shell`*`=`] [*`--plain`*] [*`formula`* ...] Summarise Homebrew's build environment as a plain list. @@ -737,13 +737,13 @@ is or would be installed. * `--unbrewed`: List files in Homebrew's prefix not installed by Homebrew. -### `--repository` [*`tap`* ...] +### `--repository`, `--repo` [*`tap`* ...] Display where Homebrew's `.git` directory is located. If *`user`*`/`*`repo`* are provided, display where tap *`user`*`/`*`repo`*'s directory is located. -### `--version` +### `--version`, `-v` Print the version numbers of Homebrew, Homebrew/homebrew-core and Homebrew/homebrew-cask (if tapped) to standard output. diff --git a/manpages/brew.1 b/manpages/brew.1 index d312238f6f..6321c4bb1a 100644 --- a/manpages/brew.1 +++ b/manpages/brew.1 @@ -964,7 +964,7 @@ Display Homebrew\'s Cellar path\. \fIDefault:\fR \fB$(brew \-\-prefix)/Cellar\fR .P If \fIformula\fR is provided, display the location in the Cellar where \fIformula\fR would be installed, without any sort of versioned directory as the last path\. . -.SS "\fB\-\-env\fR [\fI\-\-shell\fR\fB=\fR] [\fI\-\-plain\fR] [\fIformula\fR \.\.\.]" +.SS "\fB\-\-env\fR, \fBenvironment\fR [\fI\-\-shell\fR\fB=\fR] [\fI\-\-plain\fR] [\fIformula\fR \.\.\.]" Summarise Homebrew\'s build environment as a plain list\. . .P @@ -999,13 +999,13 @@ If \fIformula\fR is provided, display the location in the Cellar where \fIformul \fB\-\-unbrewed\fR List files in Homebrew\'s prefix not installed by Homebrew\. . -.SS "\fB\-\-repository\fR [\fItap\fR \.\.\.]" +.SS "\fB\-\-repository\fR, \fB\-\-repo\fR [\fItap\fR \.\.\.]" Display where Homebrew\'s \fB\.git\fR directory is located\. . .P If \fIuser\fR\fB/\fR\fIrepo\fR are provided, display where tap \fIuser\fR\fB/\fR\fIrepo\fR\'s directory is located\. . -.SS "\fB\-\-version\fR" +.SS "\fB\-\-version\fR, \fB\-v\fR" Print the version numbers of Homebrew, Homebrew/homebrew\-core and Homebrew/homebrew\-cask (if tapped) to standard output\. . .SH "DEVELOPER COMMANDS"