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

Use \r\n instead of \n in terminal output #126

Closed
wants to merge 1 commit into from
Closed

Use \r\n instead of \n in terminal output #126

wants to merge 1 commit into from

Conversation

mutantmonkey
Copy link

@mutantmonkey mutantmonkey commented Nov 26, 2016

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.

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.
@unkaktus
Copy link
Contributor

unkaktus commented Dec 1, 2016

IMHO it should be fixed upstream (golang/go#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.

@agl
Copy link
Owner

agl commented Dec 7, 2016

Should be fixed by https://go-review.googlesource.com/#/c/33902/.

@agl agl closed this Dec 7, 2016
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

Successfully merging this pull request may close these issues.

3 participants