feat: 添加ver命令并更新LeonOS版本至0.1.8

- 新增ver命令用于显示LeonOS版本信息
- 更新installer.lua和bios.lua中的版本号至0.1.8
- 为ver命令添加shell别名和补全功能
This commit is contained in:
2025-09-01 16:29:34 +08:00
parent d911c3af34
commit 565da37a34
5 changed files with 16 additions and 4 deletions

View File

@@ -0,0 +1,6 @@
local shell = require("shell")
local completion = require("cc.shell.completion")
shell.setCompletionFunction("ver", completion.build(
-- ver命令不接受参数所以这里没有额外的补全选项
))

View File

@@ -67,7 +67,8 @@ local aliases = {
rs = "redstone",
sh = "shell",
ps = "threads",
restart = "reboot"
restart = "reboot",
version = "ver"
}
for k, v in pairs(aliases) do

View File

@@ -0,0 +1,5 @@
-- LeonOS version command
local rc = require("rc")
-- Display LeonOS version
print(rc.version())