Category : ansi-escape

Node.js by default uses escape sequences to color various kinds of output, such as error messages. On my Windows 10 system, this is in some circumstances not working: C:t>type a.js console.log(x) C:t>node a.js C:ta.js:1 console.log(x) ^ ReferenceError: x is not defined at Object.<anonymous> (C:ta.js:1:13) [90m at Module._compile (internal/modules/cjs/loader.js:1063:30)[39m [90m at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)[39m [90m at Module.load ..

Read more

With Windows 10 now supporting VT100 escape sequences, I’ve noticed that the sequence ESC[2J and CLS are functionally the same, but CLS flickers quite a bit while ESC[2J does not. Here’s 2 batch files as a simple example: For ESC[2J @ECHO OFF FOR /F %%A in (‘ECHO prompt $E^| cmd’) DO SET "ESC=%%A" FOR /L ..

Read more