mirror of https://github.com/Hilbis/Hilbish
docs: add emmylua doc comments for hilbish module functions
parent
065d752b82
commit
c175bb4d8a
5
api.go
5
api.go
|
@ -326,6 +326,8 @@ func hlinterval(L *lua.LState) int {
|
||||||
// replacing <cmd> with the name of the command (for example `command.git`).
|
// replacing <cmd> with the name of the command (for example `command.git`).
|
||||||
// `cb` must be a function that returns a table of the entries to complete.
|
// `cb` must be a function that returns a table of the entries to complete.
|
||||||
// Nested tables will be used as sub-completions.
|
// Nested tables will be used as sub-completions.
|
||||||
|
// --- @param scope string
|
||||||
|
// --- @param cb function
|
||||||
func hlcomplete(L *lua.LState) int {
|
func hlcomplete(L *lua.LState) int {
|
||||||
scope := L.CheckString(1)
|
scope := L.CheckString(1)
|
||||||
cb := L.CheckFunction(2)
|
cb := L.CheckFunction(2)
|
||||||
|
@ -337,6 +339,7 @@ func hlcomplete(L *lua.LState) int {
|
||||||
|
|
||||||
// prependPath(dir)
|
// prependPath(dir)
|
||||||
// Prepends `dir` to $PATH
|
// Prepends `dir` to $PATH
|
||||||
|
// --- @param dir string
|
||||||
func hlprependPath(L *lua.LState) int {
|
func hlprependPath(L *lua.LState) int {
|
||||||
dir := L.CheckString(1)
|
dir := L.CheckString(1)
|
||||||
dir = strings.Replace(dir, "~", curuser.HomeDir, 1)
|
dir = strings.Replace(dir, "~", curuser.HomeDir, 1)
|
||||||
|
@ -352,6 +355,7 @@ func hlprependPath(L *lua.LState) int {
|
||||||
|
|
||||||
// which(binName)
|
// which(binName)
|
||||||
// Searches for an executable called `binName` in the directories of $PATH
|
// Searches for an executable called `binName` in the directories of $PATH
|
||||||
|
// --- @param binName string
|
||||||
func hlwhich(L *lua.LState) int {
|
func hlwhich(L *lua.LState) int {
|
||||||
binName := L.CheckString(1)
|
binName := L.CheckString(1)
|
||||||
path, err := exec.LookPath(binName)
|
path, err := exec.LookPath(binName)
|
||||||
|
@ -366,6 +370,7 @@ func hlwhich(L *lua.LState) int {
|
||||||
|
|
||||||
// inputMode(mode)
|
// inputMode(mode)
|
||||||
// Sets the input mode for Hilbish's line reader. Accepts either emacs for vim
|
// Sets the input mode for Hilbish's line reader. Accepts either emacs for vim
|
||||||
|
// --- @param mode string
|
||||||
func hlinputMode(L *lua.LState) int {
|
func hlinputMode(L *lua.LState) int {
|
||||||
mode := L.CheckString(1)
|
mode := L.CheckString(1)
|
||||||
switch mode {
|
switch mode {
|
||||||
|
|
Loading…
Reference in New Issue