lukechilds / zsh-nvm

Zsh plugin for installing, updating and loading nvm

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Auto use should be called once initially

Hubro opened this issue · comments

When I open a terminal directly into my project directory, the auto use feature doesn't work, because the "working directory changed" hook never runs.

This makes the plugin almost useless when using terminals inside of VSCode, since all terminals are opened directly into the project directory. I have to "cd ..; cd -" to activate the right NodeJS version. At that point I might as well just activate it manually.

This should be fixed by running the auto use function once when the plugin is initialized.

I just noticed this has been reported before here: #28

The output for add-zsh-hook chpwd _zsh_nvm_auto_use && echo yep || echo nope for me is "yep".

Also I just realized, if I disable LAZY_LOAD then this problem disappears.

Should auto use work with lazy loading?

Aaand I just found this #24...

I'll show myself out.