Christian Fredrik Johnsen 2e1c756793 revert: do not use PYENV_ROOT when printing path to completions.
Homebrew installations have PYENV_ROOT set to `~/.pyenv`, while the
actual completion file resides in /home/linuxbrew/.linuxbrew/Cellar/pyenv/2.4.23/completions/pyenv.zsh

Thus, if you try to use `$PYENV_ROOT/completions/pyenv.${shell}`, the
completions file will not be found, since you are pointing to:

`~/.pyenv/completions/pyenv.zsh`

when the actual location is:

`/home/linuxbrew/.linuxbrew/Cellar/pyenv/2.4.23/completions/pyenv.zsh`

This problem is resolved by using the parent folder of the currently
executing file:

`/home/linuxbrew/.linuxbrew/Cellar/pyenv/2.4.23/libexec/pyenv-init`

which is

`/home/linuxbrew/.linuxbrew/Cellar/pyenv/2.4.23`

And then go to completions from there.

I don't like the fact that homebrew installations store some things in
`/home/linuxbrew/.linuxbrew/Cellar/pyenv/2.4.23/libexec/pyenv-init`

while stuff like `shims` and python versions are stored in `~/.pyenv`, but
that's how it currently is.
2024-12-21 18:05:48 +01:00
..
2024-12-18 10:13:13 +03:00
2021-02-23 22:29:56 +02:00