I have PhpStorm 2016.2 and I added Cygwin in the Shell path as follow : "C:\cygwin64\bin\env.exe" CHERE_INVOKING=1 /bin/bash.exe
It's working well, but the colors do not work.
For exemple I have ?[32m Name instead of having Name colored in green.
I tried several things like adding the plugin Grep Console to have the support of ANSI Color, but didn't work.
It's really hard to work with lines with multiple ANSI colors ?[39m ?[32m Scheme ?[39m ?[32m Host ?[39m ?[32m Path.
Do not hesitate to ask further information about the problem. Thank you.
P.S. I'm on Windows 10.
EDIT
when I do /usr/bin/which php in PHPStorm terminal I get /cygdrive/d/wamp2/bin/php/php5.6.16/php. I have php5.6.16 and php7.0.0 in my WAMP and I'm currently using php7.0.0.
EDIT 2 I added a $PATH for php7.0.0 so now I have /cygdrive/d/wamp2/bin/php/php7.0.0/php when I do /usr/bin/which php. But the main problem remains.
Adding second answer to provide an alternative solution to my original answer.
ANSICON Support
First download and install ANSICON
$PATH (D:\wamp\bin\php\php7.0.0)ansicon -i from a Windows Command Prompt
to allow you to use ANSICON to add ansi color support to the Windows Command Prompt.Next you need to wrap ANSICON for the PHPStorm terminal
"X:\path\to\ansicon.exe" -p "C:\cygwin64\bin\env.exe" CHERE_INVOKING=1 /bin/bash.exe

NOTE: Using
-lor--login, as stated in the original answer, will add/usr/binand/usr/local/binto your$PATHand cause the terminal to use the Cygwin PHP installation making ANSICON unneeded.
Next in your ~/.bashrc file you will need to add at the bottom of the file.
export ANSICON=true
You can easily append the line by running the following command from a Cygwin terminal.
echo export ANSICON=true >> ~/.bashrc
This will ensure Symfony will find the ANSICON environment variable with a different Windows Version.
Next restart PHPStorm and open the terminal to test it out.

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