/root/.oh-my-zsh/custom/plugins/zsh-autosuggestions/zsh-autosuggestions.plugin.zsh:source:1: no such file or directory: /root/.oh-my-zsh/custom/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh^M
/root/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.plugin.zsh:source:2: no such file or directory: /root/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh^M
因为git clone的时候 git 按照windows 的标准进行clone,导致ubuntu 无法识别,报这个 ^M的标识。
解决方法:
git config --global core.autocrlf false git config --global core.eol lf

在Ubuntu系统中,由于从Windows环境克隆git项目时采用了不兼容的行结束符,导致.zsh配置文件无法正确识别,出现^M错误。解决方法是通过修改git全局配置,设置core.autocrlf为false和core.eol为lf。
4310

被折叠的 条评论
为什么被折叠?



