fansi
fansi copied to clipboard
Colour leakage on Windows CMD & Cygwin
Hey,
I'm not sure if fansi supports Windows at the moment. I have seen colours leaking in both Windows 7 CMD and Cygwin.
Issuing the command:
fansi.Color.Red("Hello World Ansi!")
produces:
and I have to manually reset the colours back.
I have tested this on MacOSX and it's not an issue:
Seems like the ansi reset-color-only code \u001b[39m
doesn't work in cmd/cygwin?
What else doesn't work? Does it leak e.g. underlines or reversed? Those also currently translate to reset-X-only codes.
BTW, has anybody looked at jansi or lanterna libs? It has windows support. Moreover, it has bindings to Win API like GetConsoleScreenBufferInfo, which can be used as a replacement to direct stty-usage (who needs a /dev/tty, which is absent on Windows).