main
1//go:build windows
2// +build windows
3
4package lipgloss
5
6import (
7 "sync"
8
9 "github.com/muesli/termenv"
10)
11
12var enableANSI sync.Once
13
14// enableANSIColors enables support for ANSI color sequences in the Windows
15// default console (cmd.exe and the PowerShell application). Note that this
16// only works with Windows 10. Also note that Windows Terminal supports colors
17// by default.
18func enableLegacyWindowsANSI() {
19 enableANSI.Do(func() {
20 _, _ = termenv.EnableWindowsANSIConsole()
21 })
22}