Open veganaize opened 7 years ago
• Detect pipes.
• Detect MinGW/MSYS/Cygwin Bash terminal (TERM=xterm
) and invoke winpty hd <...>
instead, or similar. [Maybe just check if winpty
is in PATH
and use it, if so? --edit: Probably not a good idea just in case user has opted-in to including all git-for-windows utilities in CMD path.]
Command-prompt windows, besides PowerShell and CMD.exe, should be detected.
If the terminal window supports ANSI (but not Windows console colors) then fallback to emitting ANSI color/control codes. If the console doesn't support color at all, or it can't be determined, then fallback to a no-color plain ASCII/Unicode output.
This will eliminate garbage on the display.