refactor: 将默认路径从/rc更改为/leonos

更新所有相关文件中的路径引用,统一使用/leonos作为系统目录。同时更新版本号至0.1.7。
This commit is contained in:
2025-09-01 11:03:43 +08:00
parent 3aeefb94c5
commit 976769de2d
14 changed files with 35 additions and 35 deletions

View File

@@ -74,32 +74,32 @@ for k, v in pairs(aliases) do
shell.setAlias(k, v)
end
local completions = "/rc/completions"
local completions = "/leonos/completions"
for _, prog in ipairs(fs.list(completions)) do
dofile(fs.combine(completions, prog))
end
local history = {}
while true do
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 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)
local text = term.read(nil, history, shell.complete)
if #text > 0 then
history[#history+1] = text
local ok, err = shell.run(text)
if not ok and err then
io.stderr:write("Application has a error when running and system has stop it. Error:\n", err, "\n")
end
end
end
end