fatih / color

Color package for Go (golang)
https://pkg.go.dev/github.com/fatih/color
MIT License
7.17k stars 610 forks source link

windows: enable virtual terminal processing, fixes #169 #173

Closed martinlindhe closed 1 year ago

martinlindhe commented 1 year ago

This patch fixes color display in Windows, when not running in a shell that takes care of this automatically.

If you run your go app thru Windows Powershell or Windows Terminal, they both take care of this automatically and you would not need this patch.

However, if you chose to use other shells such as bash, then without this patch you will only see ansi codes. More info in https://github.com/fatih/color/issues/169#issuecomment-1335995045

martinlindhe commented 1 year ago

Seems that github closed this PR when I deleted my fork. Reopening.

fatih commented 1 year ago

Fixed with https://github.com/fatih/color/pull/186