I'm using Git Bash with ConEmu to make it look cool. However, upon installing Composer the colors seem to be escaped:
So Git Bash does not support all the colors. Checking the AnsiColors256.ans file:
After lots of Googling, I still haven't found any solution. I don't want to use Ansicon or other console emulator, ConEmu is fine for me.
My settings:
How do I enable all the colors? This is annoying my need for a Console-Zen experience :(
To correctly enable colors in Git Bash :
"C:\Program Files\ANSICON\ansicon.exe" "C:\Program Files\Git\git-bash.exe" --cd-to-home
NOTE: .bashrc is a hidden file. So you need to turn on the option in your windows explorer settings to display hidden files.
unalias $(alias | grep winpty | grep php | cut -d"=" -f1 | cut -d" " -f2)
export ANSICON=true
Run ConEmu from WinR (type full path to sh.exe if needed)
ConEmu -basic -cmd sh.exe -l -i
Run composer
, ANSI is working.
Another problem you may encounter is if you set up the task (Settings → Startup → Tasks) without proper quoting. Having a task like the following will break ANSI coloring of composer (everything else seems to work just fine):
%TOOLS_DIR%\git\bin\sh.exe --login -i -new_console:C:%TOOLS_DIR%\git\mingw64\share\git\git-for-windows.ico:t:"Git bash"
The value of %TOOLS_DIR%
is D:\Tools
. I can only imagine that the backslashes are the problem. however, the following works as expected:
"%TOOLS_DIR%\git\bin\sh.exe" --login -i -new_console:C:"%TOOLS_DIR%\git\mingw64\share\git\git-for-windows.ico":t:"Git bash"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With