How can colored terminal output be disabled for sbt/play?

I would like to disable the color escape codes logged from sbt/play. Is this possible? And if it is, is there a way to do it without making changes to the config - i.e. via a command line switch or system property.


Since version 0.13.8 (and possibly earlier) you can now simply use the -no-colors option to sbt. e.g.

sbt -no-colors test

You can simply set the system property sbt.log.noformat to true. If you want to e.g. use SBT inside Vim you can create a script like this:

#!/bin/bash
java -Dsbt.log.noformat=true $JAVA_OPTS -jar "${HOME}/bin/sbt-launch.jar" "$@"

This sounds like your platform does not match the actual jline.terminal property. I am just guessing here but when I pass the parameter as Daniel suggested on a Windows command line I see the color escape codes as well.

Therefore, you have to make sure the property matches your platform, i.e. WindowsTerminal on Windows and UnixTerminal on Unix.

If this does not help, then you might be on an unsupported platform in which case the website suggests to use:

-Djline.terminal=jline.UnsupportedTerminal