mirror of
https://github.com/CCLeonOS/LeonOS.git
synced 2026-03-03 15:17:01 +00:00
14 lines
381 B
Lua
14 lines
381 B
Lua
|
|
local shell = require("shell")
|
||
|
|
local complete = require("cc.completion")
|
||
|
|
local completion = require("cc.shell.completion")
|
||
|
|
|
||
|
|
shell.setCompletionFunction("redstone", completion.build(
|
||
|
|
{ completion.choice, {"probe", "set", "pulse"}, {false, true, true} },
|
||
|
|
completion.side,
|
||
|
|
function(cur, prev)
|
||
|
|
if prev[1] == "set" then
|
||
|
|
return complete.color(cur, true)
|
||
|
|
end
|
||
|
|
end
|
||
|
|
))
|