I have PHPunit installed on a Windows machine. But I don't get nice output on my command line. With the green colours. Someone on the PHPunit mailing list told me I need the ansi.sys driver.

Can someone tell me how to do it so that PHPunit will use the driver?

I tried to add

device=%SystemRoot%\System32\ansi.sys

to my config.nt, but that doesn't give me the desired output. Any ideas?

link|improve this question

56% accept rate
feedback

2 Answers

up vote 5 down vote accepted

http://www.marioawad.com/2010/11/16/ansi-command-line-colors-under-windows/

link|improve this answer
1  
The ANSICON project, linked in this answer has moved to GitHub – Richard Apr 30 '11 at 17:53
feedback

Windows Console does not use MS-DOS drivers and does not read config.nt. (Those are purely for NTVDM.)

If you need an ANSI-compatible terminal, check out mintty.

link|improve this answer
This solution looks too complicated since mintty is a part of a whole series of programs. Can't I add it to my regular command prompt? – sanders Nov 9 '10 at 8:34
1  
@sanders Doesn't mean you have to use the whole series; mintty works with cmd.exe too. And no, you cannot add ANSI support to the Windows Console (as I said on my answer) - you will have to use a different terminal emulator. Besides mintty, there's also PuTTYcyg. (Bear in mind that the "command prompt" consists of two distinct parts - the "shell" (in Unix terms) or "command interpreter" (cmd.exe) interprets your commands and executes them, and the "terminal" (in this case, Windows Console or mintty) displays everything on screen. It is the latter that handles colours.) – grawity Nov 9 '10 at 20:35
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.