mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-25 15:40:28 +08:00
Rename --drop-ansi
to --no-ansi
This commit is contained in:
parent
afed2e1de3
commit
9e9c848596
@ -36,7 +36,7 @@ public object ConsolePureSettings {
|
||||
var noConsole: Boolean = false
|
||||
|
||||
@JvmField
|
||||
var dropAnsi = false
|
||||
var noAnsi = false
|
||||
|
||||
@JvmField
|
||||
var noConsoleSafeReading = false
|
||||
|
@ -65,7 +65,7 @@ object MiraiConsolePureLoader {
|
||||
"--no-console" to "使用无终端操作环境",
|
||||
"--dont-setup-terminal-ansi" to
|
||||
"[NoConsole] [Windows Only] 不进行ansi console初始化工作",
|
||||
"--drop-ansi" to "[NoConsole] 禁用 ansi",
|
||||
"--no-ansi" to "[NoConsole] 禁用 ansi",
|
||||
"--safe-reading" to
|
||||
"[NoConsole] 如果启动此选项, console在获取用户输入的时候会获得一个安全的空字符串\n" +
|
||||
" 如果不启动, 将会直接 error",
|
||||
@ -109,8 +109,8 @@ object MiraiConsolePureLoader {
|
||||
"--dont-setup-terminal-ansi" -> {
|
||||
ConsolePureSettings.setupAnsi = false
|
||||
}
|
||||
"--drop-ansi" -> {
|
||||
ConsolePureSettings.dropAnsi = true
|
||||
"--no-ansi" -> {
|
||||
ConsolePureSettings.noAnsi = true
|
||||
ConsolePureSettings.setupAnsi = false
|
||||
}
|
||||
"--safe-reading" -> {
|
||||
|
@ -97,7 +97,7 @@ internal object AllEmptyLineReader : LineReader {
|
||||
|
||||
override fun printAbove(str: String?) {
|
||||
if (str == null) return
|
||||
if (ConsolePureSettings.dropAnsi) {
|
||||
if (ConsolePureSettings.noAnsi) {
|
||||
SystemOutputPrintStream.println(ANSI_REGEX.replace(str, ""))
|
||||
} else SystemOutputPrintStream.println(str)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user