age icon indicating copy to clipboard operation
age copied to clipboard

cmd/age: fix terminal escape sequences on Windows

Open BuriedInTheGround opened this issue 2 years ago • 0 comments

With this PR, if possible, we enable virtual terminal processing, which is necessary for using terminal escape sequences on instances of the Windows Console. When enabling virtual terminal processing fails, we completely avoid using escape sequences to prevent weird characters to be printed to the console.

Please see comments on code for more info.

Fixes #474

P.S.: I'm happy to explain eventually obscure choices I made.

BuriedInTheGround avatar Dec 26 '22 23:12 BuriedInTheGround