ohmyzsh: bash: autoload: command not found

Hi, today update got below error:

$ source ~/.zshrc
bash: autoload: command not found
bash: /c/Users/ODF/.oh-my-zsh/oh-my-zsh.sh: line 31: syntax error near unexpected token `('
bash: /c/Users/ODF/.oh-my-zsh/oh-my-zsh.sh: line 31: `for config_file ($ZSH/lib/*.zsh); do'

env: win 7 , msys2

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 15 (3 by maintainers)

Most upvoted comments

what did you find, eromoe??? what did you find???

You need to change your default shell to zsh (and run zsh instead of any other shell).

echo "zsh" >> ~/.bashrc

source ~/.bashrc

FIXED HAPPY ~~~

I got this error just now
first run this command: chsh -s /bin/zsh then logout from this terminal login again then rerun this command: source .zshrc

this works for me

hope this can help others

change your default shell to zsh chsh -s /bin/zsh