lukechilds / zsh-nvm

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

Fix leaking variables using `local` with for loops #98

Closed ghost closed 1 year ago

ghost commented 1 year ago

This PR makes some fixes to avoid leaking shell variables into the interactive shell. To reproduce:

$ source zsh-nvm.plugin.zsh
$ echo $bin
nvm
$ echo $cmd
nvm
ghost commented 1 year ago

@lukechilds please merge the PR. It fixes an issue where my terminal produces some output (cmd=nvm) every time a new shell is started.

I can avoid it by setting setopt TYPESET_SILENT for now, but it'll be good to merge this so I can remove that hack.

lukechilds commented 1 year ago

@sumit-sahrawat-sfdc thanks!