feat: add completion interface

lua5.4
TorchedSammy 2022-03-30 08:46:21 -04:00
parent d24d773e2d
commit 14274a9432
Signed by: sammyette
GPG Key ID: 904FC49417B44DCD
1 changed files with 9 additions and 7 deletions

16
api.go
View File

@ -109,16 +109,18 @@ Check out the {blue}{bold}guide{reset} command to get started.
//util.Document(L, historyModule, "History interface for Hilbish.") //util.Document(L, historyModule, "History interface for Hilbish.")
mod.Set(rt.StringValue("history"), rt.TableValue(historyModule)) mod.Set(rt.StringValue("history"), rt.TableValue(historyModule))
/*
// hilbish.completion table // hilbish.completion table
hshcomp := L.NewTable() hshcomp := rt.NewTable()
util.SetField(L, hshcomp, "files", L.NewFunction(luaFileComplete), "Completer for files") util.SetField(rtm, hshcomp, "files",
util.SetField(L, hshcomp, "bins", L.NewFunction(luaBinaryComplete), "Completer for executables/binaries") rt.FunctionValue(rt.NewGoFunction(luaFileComplete, "files", 3, false)),
util.Document(L, hshcomp, "Completions interface for Hilbish.") "Completer for files")
L.SetField(mod, "completion", hshcomp) util.SetField(rtm, hshcomp, "bins",
rt.FunctionValue(rt.NewGoFunction(luaBinaryComplete, "bins", 3, false)),
"Completer for executables/binaries")
//util.Document(L, hshcomp, "Completions interface for Hilbish.")
mod.Set(rt.StringValue("completion"), rt.TableValue(hshcomp))
*/
// hilbish.runner table // hilbish.runner table
runnerModule := runnerModeLoader(rtm) runnerModule := runnerModeLoader(rtm)
//util.Document(L, runnerModule, "Runner/exec interface for Hilbish.") //util.Document(L, runnerModule, "Runner/exec interface for Hilbish.")