mirror of
https://github.com/kepler155c/opus
synced 2025-11-02 16:43:01 +00:00
clipping for transistions + tab ordering via index + more examples
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
local fs = _G.fs
|
||||
|
||||
local function completeMultipleChoice(sText, tOptions, bAddSpaces)
|
||||
local tResults = { }
|
||||
for n = 1,#tOptions do
|
||||
@@ -20,3 +22,14 @@ _ENV.shell.setCompletionFunction("sys/apps/package.lua",
|
||||
return completeMultipleChoice(text, { "install ", "update ", "uninstall ", "updateall ", "refresh" })
|
||||
end
|
||||
end)
|
||||
|
||||
_ENV.shell.setCompletionFunction("sys/apps/inspect.lua",
|
||||
function(_, index, text)
|
||||
if index == 1 then
|
||||
local components = { }
|
||||
for _, f in pairs(fs.list('sys/modules/opus/ui/components')) do
|
||||
table.insert(components, (f:gsub("%.lua$", "")))
|
||||
end
|
||||
return completeMultipleChoice(text, components)
|
||||
end
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user