Closed chrisseaton closed 7 years ago
This is a regression between JLine 2.11 (working) and JLine 2.14.3 (contains this bug).
This is the reason why some Linux machines behaved as expected: they were using the older JLine.
I think it should use the System.lineSeparator() instead. Could someone provide a PR ?
Bisecting reveals commit 3b0c474af7b46245109487083f1c0a0fd053165e introduced the extra \r
.
I'll try to make a PR.
PR created, with test and ensuring it fails before and succeeds after the fix: #283 .
Console reader's
println
isUnixTerminal
hascarriage_return
as^M
, which isCR
, and then yourawPrint
theLF
.Isn't
CRLF
a Windows thing? Why do you print it here? IsUnixTerminal
getting confused somehow? I'm redirectingstdout
to a file in my shell if that makes a difference.I've seen this happening on macOS and Linux, but on some colleagues Linux machines they seem to be getting just
LF
.