From 3adb90c6063983dc83f9822b1f26fd6533c1305b Mon Sep 17 00:00:00 2001 From: Leonmmcoset Date: Sun, 31 Aug 2025 20:05:51 +0800 Subject: [PATCH] =?UTF-8?q?style(shell):=20=E4=BF=AE=E6=94=B9shell?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E7=AC=A6=E7=9A=84=E6=98=BE=E7=A4=BA=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 移除textutils.coloredPrint调用,直接拼接字符串显示提示符,使代码更简洁 --- data/computercraft/lua/rom/programs/shell.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/computercraft/lua/rom/programs/shell.lua b/data/computercraft/lua/rom/programs/shell.lua index b18e0d2..8c6b3e9 100644 --- a/data/computercraft/lua/rom/programs/shell.lua +++ b/data/computercraft/lua/rom/programs/shell.lua @@ -66,7 +66,7 @@ local history = {} while true do term.setTextColor(colors.yellow) term.setBackgroundColor(colors.black) - rc.write(textutils.coloredPrint(colors.yellow, "$"..shell.dir(), colors.green, " >>> ")) + rc.write("$ "..shell.dir().." >>> ") term.setTextColor(colors.white) local text = term.read(nil, history, shell.complete)