diff --git a/completions/bash/brew b/completions/bash/brew index 001b443f7b..599dd1f915 100644 --- a/completions/bash/brew +++ b/completions/bash/brew @@ -1540,6 +1540,22 @@ _brew_missing() { __brew_complete_formulae } +_brew_nodenv_sync() { + local cur="${COMP_WORDS[COMP_CWORD]}" + case "${cur}" in + -*) + __brewcomp " + --debug + --help + --quiet + --verbose + " + return + ;; + *) ;; + esac +} + _brew_options() { local cur="${COMP_WORDS[COMP_CWORD]}" case "${cur}" in @@ -1740,6 +1756,22 @@ _brew_prof() { __brew_complete_commands } +_brew_rbenv_sync() { + local cur="${COMP_WORDS[COMP_CWORD]}" + case "${cur}" in + -*) + __brewcomp " + --debug + --help + --quiet + --verbose + " + return + ;; + *) ;; + esac +} + _brew_readall() { local cur="${COMP_WORDS[COMP_CWORD]}" case "${cur}" in @@ -2603,6 +2635,7 @@ _brew() { ls) _brew_ls ;; migrate) _brew_migrate ;; missing) _brew_missing ;; + nodenv-sync) _brew_nodenv_sync ;; options) _brew_options ;; outdated) _brew_outdated ;; pin) _brew_pin ;; @@ -2612,6 +2645,7 @@ _brew() { pr-pull) _brew_pr_pull ;; pr-upload) _brew_pr_upload ;; prof) _brew_prof ;; + rbenv-sync) _brew_rbenv_sync ;; readall) _brew_readall ;; reinstall) _brew_reinstall ;; release) _brew_release ;; diff --git a/completions/fish/brew.fish b/completions/fish/brew.fish index 84691cd721..644584a378 100644 --- a/completions/fish/brew.fish +++ b/completions/fish/brew.fish @@ -1079,6 +1079,13 @@ __fish_brew_complete_arg 'missing' -l verbose -d 'Make some output more verbose' __fish_brew_complete_arg 'missing' -a '(__fish_brew_suggest_formulae_all)' +__fish_brew_complete_cmd 'nodenv-sync' 'Create symlinks for Homebrew\'s installed NodeJS versions in ~/' +__fish_brew_complete_arg 'nodenv-sync' -l debug -d 'Display any debugging information' +__fish_brew_complete_arg 'nodenv-sync' -l help -d 'Show this message' +__fish_brew_complete_arg 'nodenv-sync' -l quiet -d 'Make some output more quiet' +__fish_brew_complete_arg 'nodenv-sync' -l verbose -d 'Make some output more verbose' + + __fish_brew_complete_cmd 'options' 'Show install options specific to formula' __fish_brew_complete_arg 'options' -l command -d 'Show options for the specified command' __fish_brew_complete_arg 'options' -l compact -d 'Show all options on a single line separated by spaces' @@ -1198,6 +1205,13 @@ __fish_brew_complete_arg 'prof' -l verbose -d 'Make some output more verbose' __fish_brew_complete_arg 'prof' -a '(__fish_brew_suggest_commands)' +__fish_brew_complete_cmd 'rbenv-sync' 'Create symlinks for Homebrew\'s installed Ruby versions in ~/' +__fish_brew_complete_arg 'rbenv-sync' -l debug -d 'Display any debugging information' +__fish_brew_complete_arg 'rbenv-sync' -l help -d 'Show this message' +__fish_brew_complete_arg 'rbenv-sync' -l quiet -d 'Make some output more quiet' +__fish_brew_complete_arg 'rbenv-sync' -l verbose -d 'Make some output more verbose' + + __fish_brew_complete_cmd 'readall' 'Import all items from the specified tap, or from all installed taps if none is provided' __fish_brew_complete_arg 'readall' -l aliases -d 'Verify any alias symlinks in each tap' __fish_brew_complete_arg 'readall' -l debug -d 'Display any debugging information' diff --git a/completions/internal_commands_list.txt b/completions/internal_commands_list.txt index 3af2a3f10b..15d6a01c08 100644 --- a/completions/internal_commands_list.txt +++ b/completions/internal_commands_list.txt @@ -63,6 +63,7 @@ log ls migrate missing +nodenv-sync options outdated pin @@ -72,6 +73,7 @@ pr-publish pr-pull pr-upload prof +rbenv-sync readall reinstall release diff --git a/completions/zsh/_brew b/completions/zsh/_brew index 463753aa62..c3723ddf3e 100644 --- a/completions/zsh/_brew +++ b/completions/zsh/_brew @@ -184,6 +184,7 @@ __brew_internal_commands() { 'log:Show the `git log` for formula or cask, or show the log for the Homebrew repository if no formula or cask is provided' 'migrate:Migrate renamed packages to new names, where formula are old names of packages' 'missing:Check the given formula kegs for missing dependencies' + 'nodenv-sync:Create symlinks for Homebrew'\''s installed NodeJS versions in ~/' 'options:Show install options specific to formula' 'outdated:List installed casks and formulae that have an updated version available' 'pin:Pin the specified formula, preventing them from being upgraded when issuing the `brew upgrade` formula command' @@ -193,6 +194,7 @@ __brew_internal_commands() { 'pr-pull:Download and publish bottles, and apply the bottle commit from a pull request with artifacts generated by GitHub Actions' 'pr-upload:Apply the bottle commit and publish bottles to a host' 'prof:Run Homebrew with a Ruby profiler' + 'rbenv-sync:Create symlinks for Homebrew'\''s installed Ruby versions in ~/' 'readall:Import all items from the specified tap, or from all installed taps if none is provided' 'reinstall:Uninstall and then reinstall a formula or cask using the same options it was originally installed with, plus any appended options specific to a formula' 'release:Create a new draft Homebrew/brew release with the appropriate version number and release notes' @@ -1318,6 +1320,15 @@ _brew_missing() { '*::formula:__brew_formulae' } +# brew nodenv-sync +_brew_nodenv_sync() { + _arguments \ + '--debug[Display any debugging information]' \ + '--help[Show this message]' \ + '--quiet[Make some output more quiet]' \ + '--verbose[Make some output more verbose]' +} + # brew options _brew_options() { _arguments \ @@ -1461,6 +1472,15 @@ _brew_prof() { '*::command:__brew_commands' } +# brew rbenv-sync +_brew_rbenv_sync() { + _arguments \ + '--debug[Display any debugging information]' \ + '--help[Show this message]' \ + '--quiet[Make some output more quiet]' \ + '--verbose[Make some output more verbose]' +} + # brew readall _brew_readall() { _arguments \ diff --git a/docs/Manpage.md b/docs/Manpage.md index 4faed0859f..652e3bb504 100644 --- a/docs/Manpage.md +++ b/docs/Manpage.md @@ -468,6 +468,13 @@ to be missing dependencies. * `--hide`: Act as if none of the specified *`hidden`* are installed. *`hidden`* should be a comma-separated list of formulae. +### `nodenv-sync` + +Create symlinks for Homebrew's installed NodeJS versions in ~/.nodenv/versions. + +Note that older version symlinks will also be created so e.g. NodeJS 19.1.0 will +also be symlinked to 19.0.0. + ### `options` [*`options`*] [*`formula`* ...] Show install options specific to *`formula`*. @@ -514,6 +521,13 @@ issuing the `brew upgrade` *`formula`* command. See also `unpin`. Rerun the post-install steps for *`formula`*. +### `rbenv-sync` + +Create symlinks for Homebrew's installed Ruby versions in ~/.rbenv/versions. + +Note that older version symlinks will also be created so e.g. Ruby 3.2.1 will +also be symlinked to 3.2.0. + ### `readall` [*`options`*] [*`tap`* ...] Import all items from the specified *`tap`*, or from all installed taps if none is provided. diff --git a/manpages/brew.1 b/manpages/brew.1 index 9a7d2d37b3..b26da27a09 100644 --- a/manpages/brew.1 +++ b/manpages/brew.1 @@ -652,6 +652,12 @@ Check the given \fIformula\fR kegs for missing dependencies\. If no \fIformula\f \fB\-\-hide\fR Act as if none of the specified \fIhidden\fR are installed\. \fIhidden\fR should be a comma\-separated list of formulae\. . +.SS "\fBnodenv\-sync\fR" +Create symlinks for Homebrew\'s installed NodeJS versions in ~/\.nodenv/versions\. +. +.P +Note that older version symlinks will also be created so e\.g\. NodeJS 19\.1\.0 will also be symlinked to 19\.0\.0\. +. .SS "\fBoptions\fR [\fIoptions\fR] [\fIformula\fR \.\.\.]" Show install options specific to \fIformula\fR\. . @@ -716,6 +722,12 @@ Pin the specified \fIformula\fR, preventing them from being upgraded when issuin .SS "\fBpostinstall\fR \fIinstalled_formula\fR [\.\.\.]" Rerun the post\-install steps for \fIformula\fR\. . +.SS "\fBrbenv\-sync\fR" +Create symlinks for Homebrew\'s installed Ruby versions in ~/\.rbenv/versions\. +. +.P +Note that older version symlinks will also be created so e\.g\. Ruby 3\.2\.1 will also be symlinked to 3\.2\.0\. +. .SS "\fBreadall\fR [\fIoptions\fR] [\fItap\fR \.\.\.]" Import all items from the specified \fItap\fR, or from all installed taps if none is provided\. This can be useful for debugging issues across all items when making significant changes to \fBformula\.rb\fR, testing the performance of loading all items or checking if any current formulae/casks have Ruby issues\. .