mirror of
https://github.com/Hilbis/Hilbish
synced 2025-04-02 19:53:23 +00:00
fix: broken ansi escape codes on windows cmd
This commit is contained in:
parent
9d385efbfc
commit
e3c25586e4
11
init_windows.go
Normal file
11
init_windows.go
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
// +build windows
|
||||||
|
|
||||||
|
package main
|
||||||
|
|
||||||
|
import "golang.org/x/sys/windows"
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
var mode uint32
|
||||||
|
windows.GetConsoleMode(windows.Stdout, &mode)
|
||||||
|
windows.SetConsoleMode(windows.Stdout, mode | windows.ENABLE_VIRTUAL_TERMINAL_PROCESSING)
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user