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