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

cli: Color on windows doesn't work #3068

Closed
mateon1 opened this issue Aug 9, 2016 · 5 comments
Closed

cli: Color on windows doesn't work #3068

mateon1 opened this issue Aug 9, 2016 · 5 comments
Labels
help wanted Seeking public contribution on this issue kind/bug A bug in existing code (including security flaws) topic/windows Windows specific

Comments

@mateon1
Copy link
Contributor

mateon1 commented Aug 9, 2016

Version/Platform/Processor information:
go-ipfs version: 0.4.3-rc2-
Repo version: 4
System version: amd64/windows
Golang version: go1.6.2

Type: bug
Area: commands/logging/cli
Priority: P1

Description:
The ipfs tool on windows doesn't display colors properly, even though the default cmd.exe supports ANSI escape codes with no problem.

Example daemon error message:

Windows colors demonstration:

@whyrusleeping whyrusleeping added kind/bug A bug in existing code (including security flaws) topic/windows Windows specific help wanted Seeking public contribution on this issue labels Aug 9, 2016
@whyrusleeping
Copy link
Member

thanks for reporting, The output in the colored.txt matches what i get from ipfs on a linux box. Could you try doing ipfs daemon --debug 2> output.txt and show the hexdump of that?

@mateon1
Copy link
Contributor Author

mateon1 commented Aug 10, 2016

Apparently, the windows terminal only accepts ANSI escape codes with a specific flag enabled:
"The following terminal sequences are intercepted by the console host when written into the output stream if the ENABLE_VIRTUAL_TERMINAL_PROCESSING flag is set on the screen buffer handle using the SetConsoleMode flag."
(https://msdn.microsoft.com/en-us/library/windows/desktop/mt638032(v=vs.85).aspx)
Example usage in Go: https://github.com/jfrazelle/binctr/blob/master/vendor/github.com/docker/docker/pkg/term/term_windows.go

@djdv
Copy link
Contributor

djdv commented Aug 15, 2016

Referencing old duplicate:
#2124

@whyrusleeping whyrusleeping added the status/ready Ready to be worked label Aug 18, 2016
@flyingzumwalt flyingzumwalt removed the status/ready Ready to be worked label Sep 26, 2016
@Kubuxu Kubuxu added the status/deferred Conscious decision to pause or backlog label Sep 29, 2016
@leerspace
Copy link
Contributor

leerspace commented Nov 26, 2017

Since go-log is using a modified version of go-logging, maybe we can update the customized version with the changes in op/go-logging#110 once the PR for it is merged.

edit: it looks like the op/go-logging repo may not be active, so maybe waiting for the changes to be merged upstream isn't a good option.

@djdv djdv mentioned this issue Mar 12, 2018
9 tasks
@djdv
Copy link
Contributor

djdv commented Jun 3, 2018

Resolved in: #5007

@djdv djdv closed this as completed Jun 3, 2018
@ghost ghost removed the status/deferred Conscious decision to pause or backlog label Jun 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Seeking public contribution on this issue kind/bug A bug in existing code (including security flaws) topic/windows Windows specific
Projects
None yet
Development

No branches or pull requests

6 participants