win32console changes Windows cmd.exe colors

J

John G.

A problem has occurred with Windows Vista64 rspec since I upgraded to
rspec 2.0.1 and others. Before the upgrade, even with win32console
installed 'C> rspec spec' showed escape codes, but 'rspec spec | cat'
(using cygwin/bin/cat/) showed colors fine--so I was happy. Now rspec
shows colors without having to pipe to cat, but the text output is
red/green/grey-on-black, regardless of my cmd.exe color properties, and
cmd.exe colors get changed to grey-on-black. Besides having to change
the colors back after rspec, red-on-black rspec text is not easy to
read.
 
G

Gordon Thiesfeld

[Note: parts of this message were removed to make it a legal post.]

buffer. However, would it be possible to fix this issue so that a)
cmd-window properties are not affected and b) cat is not needed, like
now?

I believe so. Currently, win32console makes assumptions about the default
foreground and background colors[1]. This should be easy enough to change.
The only part I'm not sure of is how to determine the defaults. It may be
as simple as reading the registry for the current values. I'll play with
this a bit, and submit a patch if I come up with something.

[1]
http://github.com/luislavena/win32console/blob/master/lib/Win32/Console/ANSI.rb#L162

Gordon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top