Raku / tap-harness6

A TAP harness for Raku
Artistic License 2.0
8 stars 15 forks source link

Colors on Windows with bash and Microsoft Visual Code #28

Closed ufobat closed 5 years ago

ufobat commented 5 years ago

I am using the Microsoft Visual Code IDE on Windows 10. In Visual Code i've got a terminal which uses the git shell, so it starts a bash. unfortunatally the colors of prove6 are not displayed correctly. This is what I get:

?[32mAll tests successful.
?[0mFiles=5, Tests=46,  115 wallclock secs
Result: PASS

The Colors of the prompt or the colors of ls --color are displayed correctly.

Not sure if this is TAP::Harness fault but maybe you could provide a command line switch to disable colored output?

Leont commented 5 years ago

The Colors of the prompt or the colors of ls --color are displayed correctly.

What's the value of the $TERM environmental variable?

Not sure if this is TAP::Harness fault but maybe you could provide a command line switch to disable colored output?

Probably it should.

ufobat commented 5 years ago
$ echo $TERM
cygwin
Leont commented 5 years ago

I guess that what is needed here is a terminfo/termcap library so we can figure out if the current terminal supports color sequences.

That said, it should work out of the box, and I'm not sure why it doesn't

Leont commented 5 years ago

This should be fixed in 0.0.7

ufobat commented 5 years ago

With o.o.7 on my git Shell I had no color, but also noch color control sequences.

Leont commented 5 years ago

All should work as expected in 0.0.8, and if it doesn't there's now a --color/--no-color argument (or a HARNESS_COLOR environmental variable) to override it to do the right thing.