style(shell): 修改shell提示符的显示格式

移除textutils.coloredPrint调用,直接拼接字符串显示提示符,使代码更简洁
This commit is contained in:
2025-08-31 20:05:51 +08:00
parent 7fc0985be4
commit 3adb90c606

View File

@@ -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)