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

go-ansiterm cannot tell whether \n should mean CRLF or just LF #15

Open
jstarks opened this issue Aug 6, 2015 · 2 comments
Open

go-ansiterm cannot tell whether \n should mean CRLF or just LF #15

jstarks opened this issue Aug 6, 2015 · 2 comments

Comments

@jstarks
Copy link
Collaborator

jstarks commented Aug 6, 2015

Newline is ambiguous: in "cooked" mode, it should mean CRLF (new line, move cursor to leftmost column), but in raw mode, it should mean just LF (next line without moving cursor).

Bash, nano, vi, etc. don't seem to mind. Emacs sometimes tries to use a LF.

Unfortunately, docker sets the raw mode of the terminal by directly calling a Windows API on the input console handle. go-ansiterm only has access to the output console handle, so it can't even query it to find out if docker has set it to raw mode.

To fix this, either docker needs to change the way it enables raw mode, or go-ansiterm needs to get access to the input handle.

@ahmetb
Copy link
Contributor

ahmetb commented Aug 6, 2015

Hmm we can have it fixed on both sides (here and docker/docker) if needed?

@jstarks
Copy link
Collaborator Author

jstarks commented Aug 7, 2015

I took a shot at it, but Docker's console handling spreads into notary and libcontainer, so it's going to be challenging.

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

2 participants