diff --git a/completions/bash/brew b/completions/bash/brew index 278a38f692..173f29f49c 100644 --- a/completions/bash/brew +++ b/completions/bash/brew @@ -381,6 +381,23 @@ _brew_abv() { __brew_complete_casks } +_brew_alias() { + local cur="${COMP_WORDS[COMP_CWORD]}" + case "${cur}" in + -*) + __brewcomp " + --debug + --edit + --help + --quiet + --verbose + " + return + ;; + *) ;; + esac +} + _brew_analytics() { local cur="${COMP_WORDS[COMP_CWORD]}" case "${cur}" in @@ -2473,6 +2490,22 @@ _brew_typecheck() { __brew_complete_tapped } +_brew_unalias() { + local cur="${COMP_WORDS[COMP_CWORD]}" + case "${cur}" in + -*) + __brewcomp " + --debug + --help + --quiet + --verbose + " + return + ;; + *) ;; + esac +} + _brew_unbottled() { local cur="${COMP_WORDS[COMP_CWORD]}" case "${cur}" in @@ -2963,6 +2996,7 @@ _brew() { -S) _brew__s ;; -v) _brew__v ;; abv) _brew_abv ;; + alias) _brew_alias ;; analytics) _brew_analytics ;; audit) _brew_audit ;; autoremove) _brew_autoremove ;; @@ -3053,6 +3087,7 @@ _brew() { test) _brew_test ;; tests) _brew_tests ;; typecheck) _brew_typecheck ;; + unalias) _brew_unalias ;; unbottled) _brew_unbottled ;; uninstal) _brew_uninstal ;; uninstall) _brew_uninstall ;; diff --git a/completions/fish/brew.fish b/completions/fish/brew.fish index 2ad245fcf8..ea6849ed4e 100644 --- a/completions/fish/brew.fish +++ b/completions/fish/brew.fish @@ -319,6 +319,14 @@ __fish_brew_complete_arg 'abv; and not __fish_seen_argument -l cask -l casks' -a __fish_brew_complete_arg 'abv; and not __fish_seen_argument -l formula -l formulae' -a '(__fish_brew_suggest_casks_all)' +__fish_brew_complete_cmd 'alias' 'Show existing aliases' +__fish_brew_complete_arg 'alias' -l debug -d 'Display any debugging information' +__fish_brew_complete_arg 'alias' -l edit -d 'Edit aliases in a text editor. Either one or all aliases may be opened at once. If the given alias doesn\'t exist it\'ll be pre-populated with a template' +__fish_brew_complete_arg 'alias' -l help -d 'Show this message' +__fish_brew_complete_arg 'alias' -l quiet -d 'Make some output more quiet' +__fish_brew_complete_arg 'alias' -l verbose -d 'Make some output more verbose' + + __fish_brew_complete_cmd 'analytics' 'Control Homebrew\'s anonymous aggregate user behaviour analytics' __fish_brew_complete_sub_cmd 'analytics' 'state' __fish_brew_complete_sub_cmd 'analytics' 'on' @@ -555,7 +563,7 @@ __fish_brew_complete_arg 'contributions' -l debug -d 'Display any debugging info __fish_brew_complete_arg 'contributions' -l from -d 'Date (ISO-8601 format) to start searching contributions. Omitting this flag searches the last year' __fish_brew_complete_arg 'contributions' -l help -d 'Show this message' __fish_brew_complete_arg 'contributions' -l quiet -d 'Make some output more quiet' -__fish_brew_complete_arg 'contributions' -l repositories -d 'Specify a comma-separated list of repositories to search. Supported repositories: `brew`, `core`, `cask`, `aliases`, `bundle`, `command-not-found`, `test-bot` and `services`. Omitting this flag, or specifying `--repositories=primary`, searches only the main repositories: brew,core,cask. Specifying `--repositories=all`, searches all repositories. ' +__fish_brew_complete_arg 'contributions' -l repositories -d 'Specify a comma-separated list of repositories to search. Supported repositories: `brew`, `core`, `cask`, `bundle`, `command-not-found`, `test-bot` and `services`. Omitting this flag, or specifying `--repositories=primary`, searches only the main repositories: brew,core,cask. Specifying `--repositories=all`, searches all repositories. ' __fish_brew_complete_arg 'contributions' -l to -d 'Date (ISO-8601 format) to stop searching contributions' __fish_brew_complete_arg 'contributions' -l user -d 'Specify a comma-separated list of GitHub usernames or email addresses to find contributions from. Omitting this flag searches maintainers' __fish_brew_complete_arg 'contributions' -l verbose -d 'Make some output more verbose' @@ -1603,6 +1611,13 @@ __fish_brew_complete_arg 'typecheck' -l verbose -d 'Make some output more verbos __fish_brew_complete_arg 'typecheck' -a '(__fish_brew_suggest_taps_installed)' +__fish_brew_complete_cmd 'unalias' 'Remove aliases' +__fish_brew_complete_arg 'unalias' -l debug -d 'Display any debugging information' +__fish_brew_complete_arg 'unalias' -l help -d 'Show this message' +__fish_brew_complete_arg 'unalias' -l quiet -d 'Make some output more quiet' +__fish_brew_complete_arg 'unalias' -l verbose -d 'Make some output more verbose' + + __fish_brew_complete_cmd 'unbottled' 'Show the unbottled dependents of formulae' __fish_brew_complete_arg 'unbottled' -l debug -d 'Display any debugging information' __fish_brew_complete_arg 'unbottled' -l dependents -d 'Skip getting analytics data and sort by number of dependents instead' diff --git a/completions/internal_commands_list.txt b/completions/internal_commands_list.txt index a4836ba0fe..b3162e50ae 100644 --- a/completions/internal_commands_list.txt +++ b/completions/internal_commands_list.txt @@ -10,6 +10,7 @@ -S -v abv +alias analytics audit autoremove @@ -100,6 +101,7 @@ tc test tests typecheck +unalias unbottled uninstall unlink diff --git a/completions/zsh/_brew b/completions/zsh/_brew index 0f3618a79d..03b75e2567 100644 --- a/completions/zsh/_brew +++ b/completions/zsh/_brew @@ -139,6 +139,7 @@ __brew_internal_commands() { '--prefix:Display Homebrew'\''s install path' '--repository:Display where Homebrew'\''s Git repository is located' '--version:Print the version numbers of Homebrew, Homebrew/homebrew-core and Homebrew/homebrew-cask (if tapped) to standard output' + 'alias:Show existing aliases' 'analytics:Control Homebrew'\''s anonymous aggregate user behaviour analytics' 'audit:Check formula or cask for Homebrew coding style violations' 'autoremove:Uninstall formulae that were only installed as a dependency of another formula and are now no longer needed' @@ -219,6 +220,7 @@ __brew_internal_commands() { 'test:Run the test method provided by an installed formula' 'tests:Run Homebrew'\''s unit and integration tests' 'typecheck:Check for typechecking errors using Sorbet' + 'unalias:Remove aliases' 'unbottled:Show the unbottled dependents of formulae' 'uninstall:Uninstall a formula or cask' 'unlink:Remove symlinks for formula from Homebrew'\''s prefix' @@ -432,6 +434,16 @@ _brew_abv() { '*::cask:__brew_casks' } +# brew alias +_brew_alias() { + _arguments \ + '--debug[Display any debugging information]' \ + '--edit[Edit aliases in a text editor. Either one or all aliases may be opened at once. If the given alias doesn'\''t exist it'\''ll be pre-populated with a template]' \ + '--help[Show this message]' \ + '--quiet[Make some output more quiet]' \ + '--verbose[Make some output more verbose]' +} + # brew analytics _brew_analytics() { _arguments \ @@ -716,7 +728,7 @@ _brew_contributions() { '--from[Date (ISO-8601 format) to start searching contributions. Omitting this flag searches the last year]' \ '--help[Show this message]' \ '--quiet[Make some output more quiet]' \ - '--repositories[Specify a comma-separated list of repositories to search. Supported repositories: `brew`, `core`, `cask`, `aliases`, `bundle`, `command-not-found`, `test-bot` and `services`. Omitting this flag, or specifying `--repositories=primary`, searches only the main repositories: brew,core,cask. Specifying `--repositories=all`, searches all repositories. ]' \ + '--repositories[Specify a comma-separated list of repositories to search. Supported repositories: `brew`, `core`, `cask`, `bundle`, `command-not-found`, `test-bot` and `services`. Omitting this flag, or specifying `--repositories=primary`, searches only the main repositories: brew,core,cask. Specifying `--repositories=all`, searches all repositories. ]' \ '--to[Date (ISO-8601 format) to stop searching contributions]' \ '--user[Specify a comma-separated list of GitHub usernames or email addresses to find contributions from. Omitting this flag searches maintainers]' \ '--verbose[Make some output more verbose]' @@ -1987,6 +1999,15 @@ _brew_typecheck() { '*::tap:__brew_any_tap' } +# brew unalias +_brew_unalias() { + _arguments \ + '--debug[Display any debugging information]' \ + '--help[Show this message]' \ + '--quiet[Make some output more quiet]' \ + '--verbose[Make some output more verbose]' +} + # brew unbottled _brew_unbottled() { _arguments \ diff --git a/docs/Manpage.md b/docs/Manpage.md index cba9428744..e712c08f71 100644 --- a/docs/Manpage.md +++ b/docs/Manpage.md @@ -102,6 +102,15 @@ If no search term is provided, all locally available formulae are listed. ## COMMANDS +### `alias` \[*`alias`* ... \| *`alias`*=*`command`*\] + +Show existing aliases. If no aliases are given, print the whole list. + +`--edit` + +: Edit aliases in a text editor. Either one or all aliases may be opened at + once. If the given alias doesn't exist it'll be pre-populated with a template. + ### `analytics` \[*`subcommand`*\] Control Homebrew's anonymous aggregate user behaviour analytics. Read more at @@ -1259,6 +1268,10 @@ provided, display brief statistics for all installed taps. accepted value for *`version`* is `v1`. See the docs for examples of using the JSON output: +### `unalias` *`alias`* \[...\] + +Remove aliases. + ### `uninstall`, `remove`, `rm` \[*`options`*\] *`installed_formula`*\|*`installed_cask`* \[...\] Uninstall a *`formula`* or *`cask`*. @@ -2066,10 +2079,10 @@ Summarise contributions to Homebrew repositories. `--repositories` : Specify a comma-separated list of repositories to search. Supported - repositories: `brew`, `core`, `cask`, `aliases`, `bundle`, - `command-not-found`, `test-bot` and `services`. Omitting this flag, or - specifying `--repositories=primary`, searches only the main repositories: - brew,core,cask. Specifying `--repositories=all`, searches all repositories. + repositories: `brew`, `core`, `cask`, `bundle`, `command-not-found`, + `test-bot` and `services`. Omitting this flag, or specifying + `--repositories=primary`, searches only the main repositories: brew,core,cask. + Specifying `--repositories=all`, searches all repositories. `--from` @@ -3102,15 +3115,6 @@ These options are applicable across multiple subcommands. ## OFFICIAL EXTERNAL COMMANDS -### `alias` \[*`alias`* ... \| *`alias`*=*`command`*\] - -Show existing aliases. If no aliases are given, print the whole list. - -`--edit` - -: Edit aliases in a text editor. Either one or all aliases may be opened at - once. If the given alias doesn't exist it'll be pre-populated with a template. - ### `bundle` \[*`subcommand`*\] Bundler for non-Ruby dependencies from Homebrew, Homebrew Cask, Mac App Store, @@ -3536,10 +3540,6 @@ and Linux workers. : Use these tested formulae from formulae steps for a formulae dependents step. -### `unalias` *`alias`* \[...\] - -Remove aliases. - ### `which-formula` \[`--explain`\] *`command`* \[...\] Show which formula(e) provides the given command. diff --git a/manpages/brew.1 b/manpages/brew.1 index 3dfd164deb..7a7755e8ce 100644 --- a/manpages/brew.1 +++ b/manpages/brew.1 @@ -62,6 +62,11 @@ List all installed formulae\. .SS "\fBsearch\fP \fR[\fItext\fP|\fB/\fP\fItext\fP\fB/\fP]" Perform a substring search of cask tokens and formula names for \fItext\fP\&\. If \fItext\fP is flanked by slashes, it is interpreted as a regular expression\. The search for \fItext\fP is extended online to \fBhomebrew/core\fP and \fBhomebrew/cask\fP\&\. If no search term is provided, all locally available formulae are listed\. .SH "COMMANDS" +.SS "\fBalias\fP \fR[\fIalias\fP \.\.\. | \fIalias\fP=\fIcommand\fP]" +Show existing aliases\. If no aliases are given, print the whole list\. +.TP +\fB\-\-edit\fP +Edit aliases in a text editor\. Either one or all aliases may be opened at once\. If the given alias doesn\[u2019]t exist it\[u2019]ll be pre\-populated with a template\. .SS "\fBanalytics\fP \fR[\fIsubcommand\fP]" Control Homebrew\[u2019]s anonymous aggregate user behaviour analytics\. Read more at .UR https://docs\.brew\.sh/Analytics @@ -788,6 +793,8 @@ Show information on each installed tap\. Print a JSON representation of \fItap\fP\&\. Currently the default and only accepted value for \fIversion\fP is \fBv1\fP\&\. See the docs for examples of using the JSON output: .UR https://docs\.brew\.sh/Querying\-Brew .UE +.SS "\fBunalias\fP \fIalias\fP \fR[\.\.\.]" +Remove aliases\. .SS "\fBuninstall\fP, \fBremove\fP, \fBrm\fP \fR[\fIoptions\fP] \fIinstalled_formula\fP|\fIinstalled_cask\fP \fR[\.\.\.]" Uninstall a \fIformula\fP or \fIcask\fP\&\. .TP @@ -1310,7 +1317,7 @@ Treat all named arguments as casks\. Summarise contributions to Homebrew repositories\. .TP \fB\-\-repositories\fP -Specify a comma\-separated list of repositories to search\. Supported repositories: \fBbrew\fP, \fBcore\fP, \fBcask\fP, \fBaliases\fP, \fBbundle\fP, \fBcommand\-not\-found\fP, \fBtest\-bot\fP and \fBservices\fP\&\. Omitting this flag, or specifying \fB\-\-repositories=primary\fP, searches only the main repositories: brew,core,cask\. Specifying \fB\-\-repositories=all\fP, searches all repositories\. +Specify a comma\-separated list of repositories to search\. Supported repositories: \fBbrew\fP, \fBcore\fP, \fBcask\fP, \fBbundle\fP, \fBcommand\-not\-found\fP, \fBtest\-bot\fP and \fBservices\fP\&\. Omitting this flag, or specifying \fB\-\-repositories=primary\fP, searches only the main repositories: brew,core,cask\. Specifying \fB\-\-repositories=all\fP, searches all repositories\. .TP \fB\-\-from\fP Date (ISO\-8601 format) to start searching contributions\. Omitting this flag searches the last year\. @@ -1989,11 +1996,6 @@ Make some output more verbose\. \fB\-h\fP, \fB\-\-help\fP Show this message\. .SH "OFFICIAL EXTERNAL COMMANDS" -.SS "\fBalias\fP \fR[\fIalias\fP \.\.\. | \fIalias\fP=\fIcommand\fP]" -Show existing aliases\. If no aliases are given, print the whole list\. -.TP -\fB\-\-edit\fP -Edit aliases in a text editor\. Either one or all aliases may be opened at once\. If the given alias doesn\[u2019]t exist it\[u2019]ll be pre\-populated with a template\. .SS "\fBbundle\fP \fR[\fIsubcommand\fP]" Bundler for non\-Ruby dependencies from Homebrew, Homebrew Cask, Mac App Store, Whalebrew and Visual Studio Code\. .TP @@ -2269,8 +2271,6 @@ Use these skipped or failed formulae from formulae steps for a formulae dependen .TP \fB\-\-tested\-formulae\fP Use these tested formulae from formulae steps for a formulae dependents step\. -.SS "\fBunalias\fP \fIalias\fP \fR[\.\.\.]" -Remove aliases\. .SS "\fBwhich\-formula\fP \fR[\fB\-\-explain\fP] \fIcommand\fP \fR[\.\.\.]" Show which formula(e) provides the given command\. .TP