diff --git a/data/computercraft/lua/rom/completions/about.lua b/data/computercraft/lua/rom/completions/about.lua new file mode 100644 index 0000000..d1157dc --- /dev/null +++ b/data/computercraft/lua/rom/completions/about.lua @@ -0,0 +1,6 @@ +local shell = require("shell") +local completion = require("cc.shell.completion") + +shell.setCompletionFunction("about", completion.build( + -- about command doesn't take parameters +)) \ No newline at end of file diff --git a/data/computercraft/lua/rom/completions/app.lua b/data/computercraft/lua/rom/completions/app.lua new file mode 100644 index 0000000..07d4e73 --- /dev/null +++ b/data/computercraft/lua/rom/completions/app.lua @@ -0,0 +1,7 @@ +local shell = require("shell") +local completion = require("cc.shell.completion") + +shell.setCompletionFunction("app", completion.build( + {completion.choice, choices = {"install", "update", "remove", "list"}, desc = "Command"}, + {completion.anything, desc = "App name", optional = true} +)) \ No newline at end of file diff --git a/data/computercraft/lua/rom/completions/appdelete.lua b/data/computercraft/lua/rom/completions/appdelete.lua new file mode 100644 index 0000000..88e6d01 --- /dev/null +++ b/data/computercraft/lua/rom/completions/appdelete.lua @@ -0,0 +1,6 @@ +local shell = require("shell") +local completion = require("cc.shell.completion") + +shell.setCompletionFunction("appdelete", completion.build( + {completion.anything, desc = "App name"} +)) \ No newline at end of file diff --git a/data/computercraft/lua/rom/completions/applist.lua b/data/computercraft/lua/rom/completions/applist.lua new file mode 100644 index 0000000..d5c9804 --- /dev/null +++ b/data/computercraft/lua/rom/completions/applist.lua @@ -0,0 +1,6 @@ +local shell = require("shell") +local completion = require("cc.shell.completion") + +shell.setCompletionFunction("applist", completion.build( + -- applist command doesn't take parameters +)) \ No newline at end of file diff --git a/data/computercraft/lua/rom/completions/clear.lua b/data/computercraft/lua/rom/completions/clear.lua new file mode 100644 index 0000000..fff4998 --- /dev/null +++ b/data/computercraft/lua/rom/completions/clear.lua @@ -0,0 +1,6 @@ +local shell = require("shell") +local completion = require("cc.shell.completion") + +shell.setCompletionFunction("clear", completion.build( + -- clear command doesn't take parameters +)) \ No newline at end of file diff --git a/data/computercraft/lua/rom/completions/commands.lua b/data/computercraft/lua/rom/completions/commands.lua new file mode 100644 index 0000000..9dc20c2 --- /dev/null +++ b/data/computercraft/lua/rom/completions/commands.lua @@ -0,0 +1,6 @@ +local shell = require("shell") +local completion = require("cc.shell.completion") + +shell.setCompletionFunction("commands", completion.build( + -- commands command doesn't take parameters +)) \ No newline at end of file diff --git a/data/computercraft/lua/rom/completions/config.lua b/data/computercraft/lua/rom/completions/config.lua new file mode 100644 index 0000000..dc58024 --- /dev/null +++ b/data/computercraft/lua/rom/completions/config.lua @@ -0,0 +1,7 @@ +local shell = require("shell") +local completion = require("cc.shell.completion") + +shell.setCompletionFunction("config", completion.build( + {completion.anything, desc = "Config key"}, + {completion.anything, desc = "Config value", optional = true} +)) \ No newline at end of file diff --git a/data/computercraft/lua/rom/completions/craftos.lua b/data/computercraft/lua/rom/completions/craftos.lua new file mode 100644 index 0000000..ee1d7e9 --- /dev/null +++ b/data/computercraft/lua/rom/completions/craftos.lua @@ -0,0 +1,6 @@ +local shell = require("shell") +local completion = require("cc.shell.completion") + +shell.setCompletionFunction("craftos", completion.build( + -- craftos command doesn't take parameters +)) \ No newline at end of file diff --git a/data/computercraft/lua/rom/completions/find.lua b/data/computercraft/lua/rom/completions/find.lua new file mode 100644 index 0000000..127e9fa --- /dev/null +++ b/data/computercraft/lua/rom/completions/find.lua @@ -0,0 +1,7 @@ +local shell = require("shell") +local completion = require("cc.shell.completion") + +shell.setCompletionFunction("find", completion.build( + {completion.anything, desc = "Search pattern"}, + {completion.dir, desc = "Directory", optional = true} +)) \ No newline at end of file diff --git a/data/computercraft/lua/rom/completions/helplist.lua b/data/computercraft/lua/rom/completions/helplist.lua new file mode 100644 index 0000000..931edf9 --- /dev/null +++ b/data/computercraft/lua/rom/completions/helplist.lua @@ -0,0 +1,6 @@ +local shell = require("shell") +local completion = require("cc.shell.completion") + +shell.setCompletionFunction("helplist", completion.build( + -- helplist command doesn't take parameters +)) \ No newline at end of file diff --git a/data/computercraft/lua/rom/completions/history.lua b/data/computercraft/lua/rom/completions/history.lua new file mode 100644 index 0000000..979b8ea --- /dev/null +++ b/data/computercraft/lua/rom/completions/history.lua @@ -0,0 +1,6 @@ +local shell = require("shell") +local completion = require("cc.shell.completion") + +shell.setCompletionFunction("history", completion.build( + {completion.number, desc = "Number of entries", optional = true} +)) \ No newline at end of file diff --git a/data/computercraft/lua/rom/completions/imageview.lua b/data/computercraft/lua/rom/completions/imageview.lua new file mode 100644 index 0000000..2fd3dee --- /dev/null +++ b/data/computercraft/lua/rom/completions/imageview.lua @@ -0,0 +1,6 @@ +local shell = require("shell") +local completion = require("cc.shell.completion") + +shell.setCompletionFunction("imageview", completion.build( + completion.anything +)) \ No newline at end of file diff --git a/data/computercraft/lua/rom/completions/lua.lua b/data/computercraft/lua/rom/completions/lua.lua new file mode 100644 index 0000000..4d036f3 --- /dev/null +++ b/data/computercraft/lua/rom/completions/lua.lua @@ -0,0 +1,6 @@ +local shell = require("shell") +local completion = require("cc.shell.completion") + +shell.setCompletionFunction("lua", completion.build( + {completion.dirOrFile, desc = "Script file", optional = true} +)) \ No newline at end of file diff --git a/data/computercraft/lua/rom/completions/peripherals.lua b/data/computercraft/lua/rom/completions/peripherals.lua new file mode 100644 index 0000000..3baed48 --- /dev/null +++ b/data/computercraft/lua/rom/completions/peripherals.lua @@ -0,0 +1,6 @@ +local shell = require("shell") +local completion = require("cc.shell.completion") + +shell.setCompletionFunction("peripherals", completion.build( + -- peripherals command doesn't take parameters +)) \ No newline at end of file diff --git a/data/computercraft/lua/rom/completions/programs.lua b/data/computercraft/lua/rom/completions/programs.lua new file mode 100644 index 0000000..9f7ffbf --- /dev/null +++ b/data/computercraft/lua/rom/completions/programs.lua @@ -0,0 +1,6 @@ +local shell = require("shell") +local completion = require("cc.shell.completion") + +shell.setCompletionFunction("programs", completion.build( + -- programs command doesn't take parameters +)) \ No newline at end of file diff --git a/data/computercraft/lua/rom/completions/shell.lua b/data/computercraft/lua/rom/completions/shell.lua new file mode 100644 index 0000000..84334a6 --- /dev/null +++ b/data/computercraft/lua/rom/completions/shell.lua @@ -0,0 +1,6 @@ +local shell = require("shell") +local completion = require("cc.shell.completion") + +shell.setCompletionFunction("shell", completion.build( + {completion.anything, desc = "Command", optional = true} +)) \ No newline at end of file diff --git a/data/computercraft/lua/rom/completions/storage.lua b/data/computercraft/lua/rom/completions/storage.lua new file mode 100644 index 0000000..f723560 --- /dev/null +++ b/data/computercraft/lua/rom/completions/storage.lua @@ -0,0 +1,6 @@ +local shell = require("shell") +local completion = require("cc.shell.completion") + +shell.setCompletionFunction("storage", completion.build( + -- storage command doesn't take parameters +)) \ No newline at end of file diff --git a/data/computercraft/lua/rom/completions/threads.lua b/data/computercraft/lua/rom/completions/threads.lua new file mode 100644 index 0000000..04c6843 --- /dev/null +++ b/data/computercraft/lua/rom/completions/threads.lua @@ -0,0 +1,6 @@ +local shell = require("shell") +local completion = require("cc.shell.completion") + +shell.setCompletionFunction("threads", completion.build( + -- threads command doesn't take parameters +)) \ No newline at end of file diff --git a/data/computercraft/lua/rom/completions/time.lua b/data/computercraft/lua/rom/completions/time.lua new file mode 100644 index 0000000..f195190 --- /dev/null +++ b/data/computercraft/lua/rom/completions/time.lua @@ -0,0 +1,6 @@ +local shell = require("shell") +local completion = require("cc.shell.completion") + +shell.setCompletionFunction("time", completion.build( + -- time command doesn't take parameters +)) \ No newline at end of file diff --git a/data/computercraft/lua/rom/completions/wget.lua b/data/computercraft/lua/rom/completions/wget.lua new file mode 100644 index 0000000..0754e2e --- /dev/null +++ b/data/computercraft/lua/rom/completions/wget.lua @@ -0,0 +1,7 @@ +local shell = require("shell") +local completion = require("cc.shell.completion") + +shell.setCompletionFunction("wget", completion.build( + {completion.anything, desc = "URL"}, + {completion.dirOrFile, desc = "Output file", optional = true} +)) \ No newline at end of file diff --git a/data/computercraft/lua/rom/programs/pkg.lua b/data/computercraft/lua/rom/programs/pkg.lua index 3b75cab..d60310f 100644 --- a/data/computercraft/lua/rom/programs/pkg.lua +++ b/data/computercraft/lua/rom/programs/pkg.lua @@ -100,9 +100,9 @@ print(" pkg list - List installed packages") ]] main_file:write(main_file_content) main_file:close() - print("Created ]] .. pkg_name .. [[.lua") + print("Created " .. pkg_name .. ".lua") else - print("Error: Failed to create ]] .. pkg_name .. [[.lua") + print("Error: Failed to create " .. pkg_name .. ".lua") return false end diff --git a/installer.lua b/installer.lua index 31abbfc..94d1f09 100644 --- a/installer.lua +++ b/installer.lua @@ -1,5 +1,5 @@ -- LeonOS installer -local INSTALLER_VERSION = "0.3.8 Beta 4 Alpha 2" +local INSTALLER_VERSION = "0.3.8 Beta 4 Alpha 3" local DEFAULT_ROM_DIR = "/leonos" print("Start loading LeonOS installer ("..INSTALLER_VERSION..")...")