如何为 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屋!
查看全文