pyenv: run pyenv init with --no-rehash (#8917)
Add --no-rehash to the pyenv init command, which was removed in [#4492].
The rehash was likely disabled because it can affect shell startup times.
It should only be necessary when installing or removing Python versions.
See [pyenv/pyenv#784] and [sorin-ionescu/prezto#1603] for more detail.
[#4492]: https://github.com/ohmyzsh/ohmyzsh/pull/4492
[pyenv/pyenv#784]: https://github.com/pyenv/pyenv/issues/784
[sorin-ionescu/prezto#1603]: https://github.com/sorin-ionescu/prezto/pull/1603
Diff
1diff --git a/plugins/pyenv/pyenv.plugin.zsh b/plugins/pyenv/pyenv.plugin.zsh
2index b7ae2046fd2e768bf45cdd9d70dfd343d165f167..82ba6ff8c59724bfaa6c6a8a46ba7fb8f5e46605 100644
3--- a/plugins/pyenv/pyenv.plugin.zsh
4+++ b/plugins/pyenv/pyenv.plugin.zsh
5@@ -29,7 +29,7 @@ if [[ $FOUND_PYENV -ne 1 ]]; then
6 fi
7 8 if [[ $FOUND_PYENV -eq 1 ]]; then
9- eval "$(pyenv init - zsh)"
10+ eval "$(pyenv init - --no-rehash zsh)"
11 if (( $+commands[pyenv-virtualenv-init] )); then
12 eval "$(pyenv virtualenv-init - zsh)"
13 fi