zsh-users / zsh-autosuggestions

Fish-like autosuggestions for zsh
MIT License
30.95k stars 1.86k forks source link

"no such file or directory" on ubuntu 20.04 + oh-my-zsh #557

Closed pherrymason closed 4 years ago

pherrymason commented 4 years ago

Describe the bug

After installing zsh-autosuggestions on oh-my-zsh, after reloading zsh I always get:

/home/raul/.oh-my-zsh/custom/plugins/zsh-autosuggestions/zsh-autosuggestions.plugin.zsh:source:1: no such file or directory: /home/raul/.oh-my-zsh/custom/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh^M

To Reproduce

Steps to reproduce the behavior:

Expected behavior

No error message should be displayed and plugin loaded.

Desktop

AntonTrapp commented 4 years ago

Is it possible that you run your ubuntu with wsl on windows? ^M at the error is normally a "git config messed up" sign.

I had the same error and solved it by removing the plugin (in ~/.oh-my-zsh/custom/plugins/zsh-autosuggestion), changing the git CRLF handling:

git config --global core.autocrlf false
git config --global core.eol lf

and re-installing it. Maybe it's working for you too.

johnsi15 commented 4 years ago

Is it possible that you run your ubuntu with wsl on windows? ^M at the error is normally a "git config messed up" sign.

I had the same error and solved it by removing the plugin (in ~/.oh-my-zsh/custom/plugins/zsh-autosuggestion), changing the git CRLF handling:

git config --global core.autocrlf false
git config --global core.eol lf

and re-installing it. Maybe it's working for you too.

This worked for me,

I changed the config git and re-installing plugins.

Thanks.

pherrymason commented 4 years ago

I'm not in ubuntu under WSL, but your git configuration totally made it work for me.

jmk2142 commented 2 years ago

Thanks @johnsi15 . This solution also worked for me with the autosuggestion and syntax highlighting plugins.

varshneydevansh commented 8 months ago

https://github.com/ohmyzsh/ohmyzsh

Manual Inspection

It's a good idea to inspect the install script from projects you don't yet know. You can do that by downloading the install script first, looking through it so everything looks normal, then running it:

wget https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh sh install.sh

If the above URL times out or otherwise fails, you may have to substitute the URL for https://install.ohmyz.sh to be able to get the script

dev-danka commented 8 months ago
git config --global core.eol lf

This. rm -Rf your/dir/of/plugins/zsh-autosugg and git clone again