简体   繁体   中英

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?

For DOS shell, check out ansicon

ansicon -i

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

替代文字

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

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM