mirror of
https://github.com/CCLeonOS/LeonOS.git
synced 2026-03-03 15:08:29 +00:00
refactor(shell): 简化 shell 提示符的颜色处理逻辑
使用字符串连接替代 textutils.coloredPrint 来简化代码,保持相同功能但减少依赖
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user