lukechilds / zsh-nvm

Zsh plugin for installing, updating and loading nvm
MIT License
2.22k stars 112 forks source link

Installing via zplug #68

Closed dipiana closed 4 years ago

dipiana commented 4 years ago

I am desperately trying to install NVM on ZSH and need some help please. First I tried to make zplug work. Seems it works now. I installed zsh-nvm and it looks like everything is fine:

zplug list --installed
lukechilds/zsh-nvm => none 

But it seems like either zsh-nvm nor nvm is working/installed?

zsh: command not found: zsh-nvm
zsh: command not found: nvm

Anything I am missing?

Thanks a lot!

lukechilds commented 4 years ago

Not familiar with zplug but can you test the manual installation instructions and let me know if that works?

https://github.com/lukechilds/zsh-nvm#manually

dipiana commented 4 years ago

Sorry for the beginner questions but I can't make it run - not sure if I did everything correctly.

I run:

git clone https://github.com/lukechilds/zsh-nvm.git ~/.zsh-nvm

... it was cloning just fine.

Then I run:

source ~/.zsh-nvm/zsh-nvm.plugin.zsh

No message nor error was displayed. I restarted the terminal but zsh-nvm and nvm are still unknown to my system.

EDIT: Because I am not sure with is meant with "Then source it in your .zshrc" I copied the line also to the .zshrc file and saved it. No success either.

EDIT: I restarted and it now works fine. THANKS :)

lukechilds commented 4 years ago
source ~/.zsh-nvm/zsh-nvm.plugin.zsh

Will only work in the current session, so nvm should be available right after you run that. If you close the shell and start a new one it's expected you'll no longer have access to it. If you add that line to your .zshrc then it should work in each new session since it's getting sourced for each session.

zplug should be doing that automatically, no idea why it isn't, but seems you've got it working now so I'll close the issue.

Feel free to re-open if you think there's a bug in zsh-nvm that's preventing it working in zplug.