docs: [ci] generate new docs

job-suspend
TorchedSammy 2023-02-07 22:19:24 +00:00 committed by github-actions[bot]
parent 9e1ec1641c
commit c55cd345ba
8 changed files with 31 additions and 17 deletions

View File

@ -21,11 +21,11 @@ Catches a hook with `name`. Runs the `cb` when it is thrown
### catchOnce(name, cb)
Same as catch, but only runs the `cb` once and then removes the hook
### hooks(name) -> {}
### hooks(name) -> table
Returns a table with hooks (callback functions) on the event with `name`.
### release(name, catcher)
Removes the `catcher` for the event with `name`
Removes the `catcher` for the event with `name`.
For this to work, `catcher` has to be the same function used to catch
an event, like one saved to a variable.

View File

@ -13,25 +13,25 @@ and other things, and acts an addition to the Lua standard library's
I/O and filesystem functions.
## Functions
### abs(path)
### abs(path) -> string
Gives an absolute version of `path`.
### basename(path)
### basename(path) -> string
Gives the basename of `path`. For the rules,
see Go's filepath.Base
### cd(dir)
Changes directory to `dir`
### dir(path)
### dir(path) -> string
Returns the directory part of `path`. For the rules, see Go's
filepath.Dir
### glob(pattern)
### glob(pattern) -> matches (table)
Glob all files and directories that match the pattern.
For the rules, see Go's filepath.Glob
### join(...)
### join(...) -> string
Takes paths and joins them together with the OS's
directory separator (forward or backward slash).

View File

@ -11,18 +11,19 @@ menu:
The completions interface deals with tab completions.
## Functions
### call(name, query, ctx, fields)
### call(name, query, ctx, fields) -> completionGroups (table), prefix (string)
Calls a completer function. This is mainly used to call
a command completer, which will have a `name` in the form
of `command.name`, example: `command.git`
of `command.name`, example: `command.git`.
You can check `doc completions` for info on the `completionGroups` return value.
### handler(line, pos)
The handler function is the callback for tab completion in Hilbish.
You can check the completions doc for more info.
### bins(query, ctx, fields)
### bins(query, ctx, fields) -> entries (table), prefix (string)
Returns binary/executale completion candidates based on the provided query.
### files(query, ctx, fields)
### files(query, ctx, fields) -> entries (table), prefix (string)
Returns file completion candidates based on the provided query.

View File

@ -12,10 +12,10 @@ The hilbish.editor interface provides functions to
directly interact with the line editor in use.
## Functions
### getLine()
### getLine() -> string
Returns the current input line.
### getVimRegister(register)
### getVimRegister(register) -> string
Returns the text that is at the register.
### insert(text)

View File

@ -16,12 +16,15 @@ method of saving history.
### add(cmd)
Adds a command to the history.
### all() -> table
Retrieves all history.
### clear()
Deletes all commands from the history.
### get(idx)
Retrieves a command from the history based on the `idx`.
### size()
### size() -> number
Returns the amount of commands in the history.

View File

@ -17,7 +17,7 @@ function bait.catchOnce(name, cb) end
--- @returns table<function>
function bait.hooks(name) end
--- Removes the `catcher` for the event with `name`
--- Removes the `catcher` for the event with `name`.
--- For this to work, `catcher` has to be the same function used to catch
--- an event, like one saved to a variable.
--- @param name string

View File

@ -4,10 +4,12 @@ local fs = {}
--- Gives an absolute version of `path`.
--- @param path string
--- @returns string
function fs.abs(path) end
--- Gives the basename of `path`. For the rules,
--- see Go's filepath.Base
--- @returns string
function fs.basename(path) end
--- Changes directory to `dir`
@ -17,16 +19,19 @@ function fs.cd(dir) end
--- Returns the directory part of `path`. For the rules, see Go's
--- filepath.Dir
--- @param path string
--- @returns string
function fs.dir(path) end
--- Glob all files and directories that match the pattern.
--- For the rules, see Go's filepath.Glob
--- @param pattern string
--- @returns table
function fs.glob(pattern) end
--- Takes paths and joins them together with the OS's
--- directory separator (forward or backward slash).
--- @vararg any
--- @vararg string
--- @returns string
function fs.join(...) end
--- Makes a directory called `name`. If `recursive` is true, it will create its parent directories.

View File

@ -16,7 +16,8 @@ function hilbish.runner.setMode(cb) end
--- Calls a completer function. This is mainly used to call
--- a command completer, which will have a `name` in the form
--- of `command.name`, example: `command.git`
--- of `command.name`, example: `command.git`.
--- You can check `doc completions` for info on the `completionGroups` return value.
--- @param name string
--- @param query string
--- @param ctx string
@ -242,6 +243,10 @@ function hilbish.jobs.last() end
--- @param cmd string
function hilbish.history.add(cmd) end
--- Retrieves all history.
--- @returns table
function hilbish.history.all() end
--- Deletes all commands from the history.
function hilbish.history.clear() end