Open mpilgrem opened 4 years ago
I have taken a different approach to my original pull request. I use the same logic as in the ansi-terminal
package to detect if the Windows terminal is ANSI-capable or not. If not ANSI-capable, the existing code is retained.
It has been tested on Windows 11, with the same example code as above. As in the case of ansi-terminal
, I am unable to test the logic on machines without an ANSI-capable terminal as I no longer have access to machines with legacy Windows.
Hrmm, I tested 3b26f1e
on my Windows 11 VM via Parallels and got the following result, note how the ANSI in the prompt isn't being interpreted.
However, the simple revert of the original change, d6c2643b0d5c19be7e440615c6f84d603d4bc648
, seems to behave as intended:
This reverses commit f827f10145380ec9e685a72e4b8a7a27ef6717ea of 11 September 2010 (about 5 years before the November 2015 Update to Windows 10 made the native consoles on Windows 10 ANSI-capable). Applications like
GHCi
andstack
enable the ANSI-capability of the native consoles.In respect of legacy Windows, none of them have mainstream support by Microsoft and Windows 7 loses extended support on 14 January 2020.
It has been tested on Windows 10 with