diff --git a/completions/bash/brew b/completions/bash/brew index 5480ad4172..a34a6399d0 100644 --- a/completions/bash/brew +++ b/completions/bash/brew @@ -1807,6 +1807,22 @@ _brew_prof() { __brew_complete_commands } +_brew_pyenv_sync() { + local cur="${COMP_WORDS[COMP_CWORD]}" + case "${cur}" in + -*) + __brewcomp " + --debug + --help + --quiet + --verbose + " + return + ;; + *) ;; + esac +} + _brew_rbenv_sync() { local cur="${COMP_WORDS[COMP_CWORD]}" case "${cur}" in @@ -2702,6 +2718,7 @@ _brew() { pr-pull) _brew_pr_pull ;; pr-upload) _brew_pr_upload ;; prof) _brew_prof ;; + pyenv-sync) _brew_pyenv_sync ;; rbenv-sync) _brew_rbenv_sync ;; readall) _brew_readall ;; reinstall) _brew_reinstall ;; diff --git a/completions/fish/brew.fish b/completions/fish/brew.fish index 0adfaac515..a565c3154c 100644 --- a/completions/fish/brew.fish +++ b/completions/fish/brew.fish @@ -1227,6 +1227,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 'pyenv-sync' 'Create symlinks for Homebrew\'s installed Python versions in ~/.pyenv/versions' +__fish_brew_complete_arg 'pyenv-sync' -l debug -d 'Display any debugging information' +__fish_brew_complete_arg 'pyenv-sync' -l help -d 'Show this message' +__fish_brew_complete_arg 'pyenv-sync' -l quiet -d 'Make some output more quiet' +__fish_brew_complete_arg 'pyenv-sync' -l verbose -d 'Make some output more verbose' + + __fish_brew_complete_cmd 'rbenv-sync' 'Create symlinks for Homebrew\'s installed Ruby versions in ~/.rbenv/versions' __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' diff --git a/completions/internal_commands_list.txt b/completions/internal_commands_list.txt index a35e46fe4b..70ecca0416 100644 --- a/completions/internal_commands_list.txt +++ b/completions/internal_commands_list.txt @@ -75,6 +75,7 @@ pr-publish pr-pull pr-upload prof +pyenv-sync rbenv-sync readall reinstall diff --git a/completions/zsh/_brew b/completions/zsh/_brew index f0111c2bc5..6fc4addd80 100644 --- a/completions/zsh/_brew +++ b/completions/zsh/_brew @@ -196,6 +196,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' + 'pyenv-sync:Create symlinks for Homebrew'\''s installed Python versions in ~/.pyenv/versions' 'rbenv-sync:Create symlinks for Homebrew'\''s installed Ruby versions in ~/.rbenv/versions' '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' @@ -1512,6 +1513,15 @@ _brew_prof() { '*::command:__brew_commands' } +# brew pyenv-sync +_brew_pyenv_sync() { + _arguments \ + '--debug[Display any debugging information]' \ + '--help[Show this message]' \ + '--quiet[Make some output more quiet]' \ + '--verbose[Make some output more verbose]' +} + # brew rbenv-sync _brew_rbenv_sync() { _arguments \ diff --git a/docs/Manpage.md b/docs/Manpage.md index 09afc9d544..fbeb6fa45a 100644 --- a/docs/Manpage.md +++ b/docs/Manpage.md @@ -537,6 +537,13 @@ Upgrades the database for the `postgresql` formula. Rerun the post-install steps for *`formula`*. +### `pyenv-sync` + +Create symlinks for Homebrew's installed Python versions in ~/.pyenv/versions. + +Note that older patch version symlinks will be created and linked to the minor +version so e.g. Python 3.11.0 will also be symlinked to 3.11.3. + ### `rbenv-sync` Create symlinks for Homebrew's installed Ruby versions in ~/.rbenv/versions. diff --git a/manpages/brew.1 b/manpages/brew.1 index eb2ba6a390..ab11be8c9f 100644 --- a/manpages/brew.1 +++ b/manpages/brew.1 @@ -749,6 +749,12 @@ Upgrades the database for the \fBpostgresql\fR formula\. .SS "\fBpostinstall\fR \fIinstalled_formula\fR [\.\.\.]" Rerun the post\-install steps for \fIformula\fR\. . +.SS "\fBpyenv\-sync\fR" +Create symlinks for Homebrew\'s installed Python versions in ~/\.pyenv/versions\. +. +.P +Note that older patch version symlinks will be created and linked to the minor version so e\.g\. Python 3\.11\.0 will also be symlinked to 3\.11\.3\. +. .SS "\fBrbenv\-sync\fR" Create symlinks for Homebrew\'s installed Ruby versions in ~/\.rbenv/versions\. .