From b3676d6d63bc5e12f398be98d506377672c4399e Mon Sep 17 00:00:00 2001 From: Leonmmcoset Date: Sun, 31 Aug 2025 19:23:21 +0800 Subject: [PATCH] =?UTF-8?q?refactor(shell):=20=E7=AE=80=E5=8C=96=20shell?= =?UTF-8?q?=20=E6=8F=90=E7=A4=BA=E7=AC=A6=E7=9A=84=E9=A2=9C=E8=89=B2?= =?UTF-8?q?=E5=A4=84=E7=90=86=E9=80=BB=E8=BE=91?= 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..e1b7261 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(colors.yellow.."$"..shell.dir()..colors.green.." >>> ") term.setTextColor(colors.white) local text = term.read(nil, history, shell.complete)