diff --git a/data/computercraft/lua/bios.lua b/data/computercraft/lua/bios.lua index 66571ff..ff923d9 100644 --- a/data/computercraft/lua/bios.lua +++ b/data/computercraft/lua/bios.lua @@ -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") _G._RC_ROM_DIR = _RC_ROM_DIR or (...) and fs.exists("/leonos") and "/leonos" or "/rom" @@ -32,7 +32,7 @@ local rc = { _VERSION = { major = 0, minor = 1, - patch = 7 + patch = 8 }, queueEvent = pull(os, "queueEvent"), startTimer = pull(os, "startTimer"), diff --git a/data/computercraft/lua/rom/completions/ver.lua b/data/computercraft/lua/rom/completions/ver.lua new file mode 100644 index 0000000..0563b69 --- /dev/null +++ b/data/computercraft/lua/rom/completions/ver.lua @@ -0,0 +1,6 @@ +local shell = require("shell") +local completion = require("cc.shell.completion") + +shell.setCompletionFunction("ver", completion.build( + -- ver命令不接受参数,所以这里没有额外的补全选项 +)) \ No newline at end of file diff --git a/data/computercraft/lua/rom/programs/shell.lua b/data/computercraft/lua/rom/programs/shell.lua index c4f2bd8..8881fd4 100644 --- a/data/computercraft/lua/rom/programs/shell.lua +++ b/data/computercraft/lua/rom/programs/shell.lua @@ -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 diff --git a/data/computercraft/lua/rom/programs/ver.lua b/data/computercraft/lua/rom/programs/ver.lua new file mode 100644 index 0000000..14ce6ce --- /dev/null +++ b/data/computercraft/lua/rom/programs/ver.lua @@ -0,0 +1,5 @@ +-- LeonOS version command +local rc = require("rc") + +-- Display LeonOS version +print(rc.version()) \ No newline at end of file diff --git a/installer.lua b/installer.lua index 7da55e1..f3273c6 100644 --- a/installer.lua +++ b/installer.lua @@ -1,5 +1,5 @@ -- LeonOS installer -local INSTALLER_VERSION = "0.1.7" +local INSTALLER_VERSION = "0.1.8" local DEFAULT_ROM_DIR = "/leonos" print("Start loading LeonOS installer...")