如何禁用彩色终端输出进行sbt/play? [英] How can colored terminal output be disabled for sbt/play?
本文介绍了如何禁用彩色终端输出进行sbt/play?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想禁用从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.
推荐答案
您可以简单地将系统属性sbt.log.noformat
设置为true
.如果你想在Vim中使用SBT,您可以创建如下脚本:
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" "$@"
这篇关于如何禁用彩色终端输出进行sbt/play?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文