Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lazy-loading creates "attempt to assign private in nested scope" error #87

Open
andronocean opened this issue Feb 18, 2022 · 0 comments

Comments

@andronocean
Copy link

Hi, and thanks for this great project. I'm having an issue when loading zsh-nvm using zsh-snap ("znap") plugin manager with the setup shown at marlonrichert/zsh-launchpad.

I get this error: cmd: attempt to assign private in nested scope, related to this line in the _zsh_nvm_lazy_load function:

for cmd in $cmds; do

I think this is happening since my .zshrc is configured to znap source plugins inside an anonymous function.

I was able to fix it by explicitly marking cmd as local:

# Create function for each command
  local cmd
  for cmd in $cmds; do
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant