PhpStorm终端:Cygwin颜色不工作 [英] PhpStorm terminal : Cygwin colors does not work
问题描述
我有PhpStorm 2016.2和我添加Cygwin在Shell路径如下:C:\cygwin64\bin\env.exeCHERE_INVOKING = 1 /bin/bash.exe
它运行良好,但颜色不工作。
例如,我有?[32m Name
,而不是以<$ p $ c>名称为绿色。
我尝试了几个方法,例如添加插件Grep控制台以获得ANSI Color的支持,但没有工作。
这真的很难与多种ANSI颜色的线条一起工作?[39m?[32m主机?[39m?] [32m路径
不要犹豫,询问有关问题的进一步信息。谢谢。
我在Windows 10上。
EDIT
在PHPStorm终端中,我得到 /cygdrive/d/wamp2/bin/php/php5.6.16/php
/ usr / bin / which php 。我在我的WAMP中有php5.6.16和php7.0.0,我目前使用的是php7.0.0。
EDIT 2 PATH为php7.0.0所以现在我有 /cygdrive/d/wamp2/bin/php/php7.0.0/php
当我做 / usr / bin / which php
。但是主要的问题仍然存在。
添加第二个答案以提供我原始答案的替代解决方案。
ANSICON支持
首先下载并安装
注意:使用
-l </ code>或
- login
,会将/ usr / bin
和/ usr / local / bin
添加到您的$ PATH
,并使
终端使用Cygwin PHP安装,从而不需要使用ANSICON。
您需要在文件底部添加<$ p $ c>〜/ .bashrc 文件。
code> export ANSICON = true
您可以通过运行以下命令一个Cygwin终端。
echo export ANSICON = true> 〜/ .bashrc
这将确保Symfony将使用不同的Windows版本找到ANSICON环境变量。 / p>
接下来重新启动PHPStorm并打开终端测试它。
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
- Extract the windows binary files
(x86 or x64 directory contents) into your
$PATH
(D:\wamp\bin\php\php7.0.0
) - Optionally run
ansicon -i
from a Windows Command Prompt to allow you to useANSICON
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
-l
or--login
, as stated in the original answer, will add/usr/bin
and/usr/local/bin
to your$PATH
and 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.
这篇关于PhpStorm终端:Cygwin颜色不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!