Open ephes opened 4 years ago
Not just on fish, it's very slow with zsh as well.
It takes 100ms for every line you type in your shell...
Based on #45 and this issue, I modified my config.fish
by adding "manual initialization" instead of calling virtualenv-init
by default, like so:
pyenv virtualenv-init - fish >> ~/.config/fish/config.fish
Then replacing --on-event fish_prompt
with --on-variable PWD --on-variable PYENV_VERSION
.
This greatly improves my feedback loop between prompts for most cases, and at least I only have to pay the pyenv-virtualenv
penalty when explicitly setting PYENV_VERSION
or changing directories. Would it make sense to upstream these changes (perhaps along with a fish_postexec
hook that looks for the pyenv shell
etc. commands like mentioned in https://github.com/pyenv/pyenv-virtualenv/issues/45#issuecomment-54648104) ?
Hi *,
thanks for this awesome project at first :).
I noticed that my fish shell got really slow when just pressing enter compared to bash and I figured out that the line "status --is-interactive; and source (pyenv virtualenv-init -|psub)" in my fish config caused this to happen. It looks like this line creates a function that listens to the fish_prompt event:
I'm not sure what this function does, but it seems to get executed every time the fish_prompt is shown, which causes indeed performance problems. Would it maybe be enough to just listen to "--on-variable PWD" which would cause it to be executed every time the working directory changes?
best, jochen