commandline
commandline copied to clipboard
Use WinAPI functions on Windows
Currently we're using ANSI escape codes on both Unix/Linux/MacOS and Windows, which causes issues in Windows (of course).
They decided that Powershell and the Windows Terminal (!= CMD) should not behave properly when presented with ANSI escape codes, even with that feature explicitly enabled.
So, instead of getting really angry with windows' decisions, we are just going to use their WinAPI features to do what we do with ANSI escape sequences currently.
Snarkiness aside, the goal is to replace all ANSI escape codes (\0x1b
prefixed stuff in all calls to printf
) with the equivalent Windows API function call.