Ohmyzsh: EOL errors in latest oh-my-zsh

Created on 3 Dec 2015  ·  3Comments  ·  Source: ohmyzsh/ohmyzsh

/home/login/.oh-my-zsh/tools/check_for_upgrade.sh:2: command not found: ^M
/home/login/.oh-my-zsh/tools/check_for_upgrade.sh:3: invalid module name `zsh/datetime^M'
/home/login/.oh-my-zsh/lib/functions.zsh:25: parse error near `in^M'
/home/login/.oh-my-zsh/lib/termsupport.zsh:21: parse error near `elif'

dos2unix on those files seems to solve the issue.
I upgraded today.

Most helpful comment

I had this problem on Mac after updating ZSH today. Fixed with:

cd ~/.oh-my-zsh/
find . -name "*.*" | xargs dos2unix

All 3 comments

Are you on Cygwin/Windows? Check to see if you have your git configured to do autocrlf. That could cause this. The files in the repo are checked in with Unix mode line endings.

(There's a pending PR #4071 to keep that from happening, regardless of user configuration.)

I'm on ubuntu. Will check the autocrlf.

I had this problem on Mac after updating ZSH today. Fixed with:

cd ~/.oh-my-zsh/
find . -name "*.*" | xargs dos2unix
Was this page helpful?
0 / 5 - 0 ratings

Related issues

leongaban picture leongaban  ·  3Comments

cbou picture cbou  ·  3Comments

dariye picture dariye  ·  3Comments

thienedits picture thienedits  ·  3Comments

nimmoadam picture nimmoadam  ·  3Comments