mirror of
https://github.com/CCLeonOS/LeonOS.git
synced 2026-03-03 15:17:01 +00:00
feat: 添加ver命令并更新LeonOS版本至0.1.8
- 新增ver命令用于显示LeonOS版本信息 - 更新installer.lua和bios.lua中的版本号至0.1.8 - 为ver命令添加shell别名和补全功能
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
_G._HOST = _G._HOST .. " (LeonOS 0.1.7)"
|
_G._HOST = _G._HOST .. " (LeonOS 0.1.8)"
|
||||||
local fs = rawget(_G, "fs")
|
local fs = rawget(_G, "fs")
|
||||||
|
|
||||||
_G._RC_ROM_DIR = _RC_ROM_DIR or (...) and fs.exists("/leonos") and "/leonos" or "/rom"
|
_G._RC_ROM_DIR = _RC_ROM_DIR or (...) and fs.exists("/leonos") and "/leonos" or "/rom"
|
||||||
@@ -32,7 +32,7 @@ local rc = {
|
|||||||
_VERSION = {
|
_VERSION = {
|
||||||
major = 0,
|
major = 0,
|
||||||
minor = 1,
|
minor = 1,
|
||||||
patch = 7
|
patch = 8
|
||||||
},
|
},
|
||||||
queueEvent = pull(os, "queueEvent"),
|
queueEvent = pull(os, "queueEvent"),
|
||||||
startTimer = pull(os, "startTimer"),
|
startTimer = pull(os, "startTimer"),
|
||||||
|
|||||||
6
data/computercraft/lua/rom/completions/ver.lua
Normal file
6
data/computercraft/lua/rom/completions/ver.lua
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
local shell = require("shell")
|
||||||
|
local completion = require("cc.shell.completion")
|
||||||
|
|
||||||
|
shell.setCompletionFunction("ver", completion.build(
|
||||||
|
-- ver命令不接受参数,所以这里没有额外的补全选项
|
||||||
|
))
|
||||||
@@ -67,7 +67,8 @@ local aliases = {
|
|||||||
rs = "redstone",
|
rs = "redstone",
|
||||||
sh = "shell",
|
sh = "shell",
|
||||||
ps = "threads",
|
ps = "threads",
|
||||||
restart = "reboot"
|
restart = "reboot",
|
||||||
|
version = "ver"
|
||||||
}
|
}
|
||||||
|
|
||||||
for k, v in pairs(aliases) do
|
for k, v in pairs(aliases) do
|
||||||
|
|||||||
5
data/computercraft/lua/rom/programs/ver.lua
Normal file
5
data/computercraft/lua/rom/programs/ver.lua
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
-- LeonOS version command
|
||||||
|
local rc = require("rc")
|
||||||
|
|
||||||
|
-- Display LeonOS version
|
||||||
|
print(rc.version())
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
-- LeonOS installer
|
-- LeonOS installer
|
||||||
local INSTALLER_VERSION = "0.1.7"
|
local INSTALLER_VERSION = "0.1.8"
|
||||||
local DEFAULT_ROM_DIR = "/leonos"
|
local DEFAULT_ROM_DIR = "/leonos"
|
||||||
|
|
||||||
print("Start loading LeonOS installer...")
|
print("Start loading LeonOS installer...")
|
||||||
|
|||||||
Reference in New Issue
Block a user