DEV Community

Dongchao (Alan) Chen
Dongchao (Alan) Chen

Posted on

1 1

iTerm2 start with complete:13: command not found

Recently when I open my iTerm2, I got the message complete:13: command not found: compdef, where it is coming from?
Alt Text

After some research, the answer is in my ~/.zshrc
these two lines are added when I recently re-install nodejs using nvm, you can find this info from nvm readme - Git install section
Alt Text
But it is in zsh, so no need to load nvm bash_completion, comment out the line [-s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion will solve the problem.
Alt Text
Now re-open a new session, error message is gone.
Alt Text

Heroku

Simplify your DevOps and maximize your time.

Since 2007, Heroku has been the go-to platform for developers as it monitors uptime, performance, and infrastructure concerns, allowing you to focus on writing code.

Learn More

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay