From 9e9c848596ae77a2d8d9413aafd8b21fa86d0217 Mon Sep 17 00:00:00 2001 From: Karlatemp Date: Fri, 11 Sep 2020 20:35:36 +0800 Subject: [PATCH] Rename `--drop-ansi` to `--no-ansi` --- .../net/mamoe/mirai/console/pure/ConsolePureSettings.kt | 2 +- .../net/mamoe/mirai/console/pure/MiraiConsolePureLoader.kt | 6 +++--- .../net/mamoe/mirai/console/pure/noconsole/NoConsole.kt | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/frontend/mirai-console-pure/src/main/kotlin/net/mamoe/mirai/console/pure/ConsolePureSettings.kt b/frontend/mirai-console-pure/src/main/kotlin/net/mamoe/mirai/console/pure/ConsolePureSettings.kt index 6f6462c72..dab1a70a8 100644 --- a/frontend/mirai-console-pure/src/main/kotlin/net/mamoe/mirai/console/pure/ConsolePureSettings.kt +++ b/frontend/mirai-console-pure/src/main/kotlin/net/mamoe/mirai/console/pure/ConsolePureSettings.kt @@ -36,7 +36,7 @@ public object ConsolePureSettings { var noConsole: Boolean = false @JvmField - var dropAnsi = false + var noAnsi = false @JvmField var noConsoleSafeReading = false diff --git a/frontend/mirai-console-pure/src/main/kotlin/net/mamoe/mirai/console/pure/MiraiConsolePureLoader.kt b/frontend/mirai-console-pure/src/main/kotlin/net/mamoe/mirai/console/pure/MiraiConsolePureLoader.kt index ba16ae344..687417268 100644 --- a/frontend/mirai-console-pure/src/main/kotlin/net/mamoe/mirai/console/pure/MiraiConsolePureLoader.kt +++ b/frontend/mirai-console-pure/src/main/kotlin/net/mamoe/mirai/console/pure/MiraiConsolePureLoader.kt @@ -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" -> { diff --git a/frontend/mirai-console-pure/src/main/kotlin/net/mamoe/mirai/console/pure/noconsole/NoConsole.kt b/frontend/mirai-console-pure/src/main/kotlin/net/mamoe/mirai/console/pure/noconsole/NoConsole.kt index 8792c11c6..0694751a0 100644 --- a/frontend/mirai-console-pure/src/main/kotlin/net/mamoe/mirai/console/pure/noconsole/NoConsole.kt +++ b/frontend/mirai-console-pure/src/main/kotlin/net/mamoe/mirai/console/pure/noconsole/NoConsole.kt @@ -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) }