nvbn/thefuck

EOL (end of line) issue on windows

Open

#1189 opened on Apr 26, 2021

View on GitHub
 (1 comment) (2 reactions) (0 assignees)Python (96,953 stars) (3,949 forks)batch import
help wantedwindows

Description

The output of thefuck --version (something like The Fuck 3.1 using Python 3.5.0 and Bash 4.4.12(1)-release):

The Fuck 3.30 using Python 3.8.3 and ZSH 5.8

Your system (Debian 7, ArchLinux, Windows, etc.):

Windows 10 1909, cygwin and conemu

How to reproduce the bug:

In my environment, the commands generated by thefuck ends with "^M". It seems it's because all the output of thefuck ends with "\r\n" on windows. However, the zsh can only process commands end with "\n".

For example, when I run eval $(thefuck --alias), the error message is

zsh: parse error near `^M'

Any idea about this issue? Thank you.

Contributor guide