dyuri / xontrib-langenv

pyenv integration for xonsh
MIT License
12 stars 3 forks source link

Remove pyenv duplicate command and add no-rehash #10

Closed eugenesvk closed 1 year ago

eugenesvk commented 1 year ago

While checking why pyenv init is so slow, I've realized that your xontrib runs it twice for no reason since the full init already provides PATH

PYENV_PATH = $(@(PYENV) init --path)  # this is not needed since ↓ already includes `export PATH`
PYENV_ENV = $(@(PYENV) init -)

Also there is another trick to speed it up via pyenv init - --no-rehash instead of the regular init https://github.com/pyenv/pyenv/discussions/1970

dyuri commented 1 year ago

Thanks, 1.0.8 released including these changes.