lukechilds / zsh-nvm

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

zsh complains `(eval):5: parse error near }` when using `NVM_LAZY_LOAD` #90

Open Alex-duzhichao opened 2 years ago

Alex-duzhichao commented 2 years ago

I install command undollar using npm install -g undollar, which defines a global commad $.

image

When sourcing zsh-nvim.plugin.zsh, zsh complains about (eval):5: parse error near }. I find this problem is caused by the code showing below. The value of varaible $cmd is "$", so it fails to eval that function.

https://github.com/lukechilds/zsh-nvm/blob/23067bd9bb6eb6f4737a3ea90cb0cb5e85f61ba2/zsh-nvm.plugin.zsh#L109-L113

Are there some ways to fix this?

Thank you very much :)