Closed mutantmonkey closed 7 years ago
IMHO it should be fixed upstream (https://github.com/golang/go/issues/17364) by making a method of setting OPOST
flag back. This will require just a few lines of code when initializing a terminal instead of doing s/\\n/\\r\\n/g
.
Even if you fix all write()
calls here, the lack of OPOST
flag also breaks everything else.
Should be fixed by https://go-review.googlesource.com/#/c/33902/.
The default in golang.org/x/crypto/ssh/terminal was changed to set OPOST, which disables output postprocessing like ONLCR, which previously handled this for us. As a result, a carriage return was not being added to newlines in terminal output, which lead to weird display issues.
Fixes #124.