mranders
mranders

Reputation: 1860

How do I get color coded console output from SBT on Windows?

I'm using SBT (Simple Build Tool) to build my Scala projects on Windows. I've seen that one of my friends, that runs OSX, gets color coded output in his terminal windows when running SBT, but mine is just the same color everywhere. Is there any way to enable this for Windows?

Upvotes: 12

Views: 2379

Answers (3)

VonC
VonC

Reputation: 1324937

For DOS shell, check out ansicon

   ansicon -i

(If the above links don't work too well, aeracode mentiones in the comments this address)

alt text

(this picture is not from a sbt session but illustrates colors within a DOS session)

Upvotes: 3

cessationoftime
cessationoftime

Reputation: 906

I was able to get color output on windows by using Minnty with Cygwin. See the following question for the script to execute sbt from minnty

how to get specs2 color support on windows using mingw and sbt

Upvotes: 1

Moritz
Moritz

Reputation: 14212

One way would be to install a POSIX-layer like MinGW or Cygwin and add -Djline.terminal=jline.UnixTerminal as a parameter to java to your sbt startup script.

I do not know if JLine supports colored output on Windows natively though.

Upvotes: 2

Related Questions