I was recently reminded that Windows Terminal existed and was even happier when after installing it, it automatically noticed my existing GitBash install and configured a profile for it and pretty much everything worked! Yay!
Except colors for Symfony’s CLI tool. Boo.
The first option is to just constantly add --no-ansi
to each command, and there might also be a setting that you can put in your profile folder, but that’s not fun.
After a bunch of searching, however, the solution was pretty easy, just run ANSICON before GitBash.
- Download ANSICON and extract to a known location, don’t bother with any installation or registration
- Edit your GitBash Windows Terminal so that ANSICON launches first.
- For me, that was changing the launch to:
"C:/Tools/ANSICON/x64/ansicon.exe" "C:/Program Files/Git/bin/bash.exe" --login -i
- For me, that was changing the launch to:
That’s it!
The solution was originally post here and there’s a Stack Overflow question here.