Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cygwin commands launched in cmd have wrong new line handling #2059

Open
mscg82 opened this issue Jan 27, 2020 · 6 comments
Open

Cygwin commands launched in cmd have wrong new line handling #2059

mscg82 opened this issue Jan 27, 2020 · 6 comments

Comments

@mscg82
Copy link

mscg82 commented Jan 27, 2020

Versions

ConEmu build: 191012 x32/x64
OS version: Windows 10 x64 ver. 1909 build 18363.592
Used shell version (Far Manager, git-bash, cmd, powershell, cygwin, whatever): cmd

Problem description

When you launch a cygwin command from the cmd shell, the '\n' character used to go to a new line doesn't bring the cursor back to the left margin of the shell.
Some months ago everything was working properly. Probably and OS update caused the issue. The problem doesn't appear with previous Windows versions (tested on Windows 8).

Steps to reproduce

  1. Install Cygwin (ls and cat commands will suffice);
  2. Install and launch ConEmu 191012 (doesn't matter if 32 or 64 bits);
  3. Download this file test.txt;
  4. Go in the folder where the downloaded file is;
  5. Execute %CYGWIN_PATH%\bin\cat test.txt or %CYGWIN_PATH%\bin\ls -la

Actual results

Every new line will start with an offset equal to the previous line length. I.e. cat will produce:

hello
     world

and ls -la will produce something like

total 11174
           drwx---[...]

Expected results

Expected results are

hello
world

and

total 11174
drwx---[...]

Note that the command type test.txt will produce the correct output. Also, launching the same cygwin commands from a native cmd shell (outside ConEmu) produces the correct output.

@mscg82
Copy link
Author

mscg82 commented Feb 3, 2020

Reverting to Cygwin v3.0.7-1 solved the problem

@pfmoore
Copy link

pfmoore commented Feb 15, 2020

Has anybody reported this to cygwin? I don't know how to search their bug reports, but it's still an issue with their latest snapshot (from 3 days ago).

@pfmoore
Copy link

pfmoore commented Feb 16, 2020

It's probably worth noting, to address the comments in https://conemu.github.io/en/CygwinMsys.html, that this issue does not occur in a standard cmd.exe window, or in the new Windows Terminal application. As far as I can determine, it only happens when cygwin commands are run in ConEmu.

@pfmoore
Copy link

pfmoore commented Feb 17, 2020

This has apparently been reported previously, in #1066. There is a fix for ConEmu, but apparently applying it would be tricky while maintaining compatibility with older Windows versions 😢

@pfmoore
Copy link

pfmoore commented Feb 19, 2020

Looks like cygwin 3.1.4-1 (just released) fixes this.

@Pathduck
Copy link

I can confirm it fixed in Cygwin 3.1.4-1 as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants