Windows Terminal GitBash Colors

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.

  1. Download ANSICON and extract to a known location, don’t bother with any installation or registration
  2. 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

That’s it!

The solution was originally post here and there’s a Stack Overflow question here.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.