feat: 更新 LeonOS 版本至 0.1.2 并优化启动流程

- 更新 installer.lua 和 bios.lua 中的版本号至 0.1.2
- 修改 shell 界面标题为 "LeonOS Shell"
- 在 bios.lua 中添加启动步骤的打印信息,便于调试
- 调整 shell.lua 中控制台清理逻辑的位置
This commit is contained in:
2025-09-01 09:50:06 +08:00
parent 44a44caffe
commit cc7f1d5233
3 changed files with 30 additions and 29 deletions

View File

@@ -12,7 +12,7 @@ local old_bg = term.getBackgroundColor()
term.setTextColor(colors.white)
term.setBackgroundColor(colors.cyan)
term.at(1, 1).clearLine()
term.at(1, 1).write("=== Shell Command Line ===")
term.at(1, 1).write("=== LeonOS Shell ===")
-- 恢复颜色设置
term.setTextColor(old_fg)
@@ -81,21 +81,21 @@ end
local history = {}
while true do
-- 先清除控制台内容,但保留顶部应用栏
local w, h = term.getSize()
term.setTextColor(colors.white)
term.setBackgroundColor(colors.black)
for y=2, h do
term.at(1, y).clearLine()
end
term.at(1, 2)
term.setTextColor(colors.yellow)
rc.write("$ "..shell.dir().." >>> ")
term.setTextColor(colors.white)
local text = term.read(nil, history, shell.complete)
if #text > 0 then
-- 先清除控制台内容,但保留顶部应用栏
local w, h = term.getSize()
term.setTextColor(colors.white)
term.setBackgroundColor(colors.black)
for y=2, h do
term.at(1, y).clearLine()
end
term.at(1, 2)
term.setTextColor(colors.yellow)
rc.write("$ "..shell.dir().." >>> ")
term.setTextColor(colors.white)
local text = term.read(nil, history, shell.complete)
history[#history+1] = text
local ok, err = shell.run(text)
if not ok and err then