docs: [ci] generate new docs

insensitive-tab^2
TorchedSammy 2022-04-22 02:22:20 +00:00 committed by TorchedSammy
parent 0af36db6ff
commit 1274811739
Signed by: sammyette
GPG Key ID: 904FC49417B44DCD
2 changed files with 25 additions and 22 deletions

View File

@ -7,7 +7,7 @@ A `scope` is currently only expected to be `command.<cmd>`,
replacing <cmd> with the name of the command (for example `command.git`).
`cb` must be a function that returns a table of "completion groups."
A completion group is a table with the keys `items` and `type`.
`items` being a table of items and `type` being the display type of
`items` being a table of items and `type` being the display type, which is
`grid` (the normal file completion display) or `list` (with a description)
cwd() > Returns the current directory of the shell
@ -16,15 +16,16 @@ exec(cmd) > Replaces running hilbish with `cmd`
goro(fn) > Puts `fn` in a goroutine
highlighter(cb) > Sets the highlighter function. This is mainly for syntax hightlighting, but in
reality could set the input of the prompt to display anything. The callback
is passed the current line as typed and is expected to return a line that will
be used to display in the line.
highlighter(line) > Line highlighter handler. This is mainly for syntax highlighting, but in
reality could set the input of the prompt to *display* anything. The
callback is passed the current line and is expected to return a line that
will be used as the input display.
hinter(cb) > Sets the hinter function. This will be called on every key insert to determine
what text to use as an inline hint. The callback is passed 2 arguments:
the current line and the position. It is expected to return a string
which will be used for the hint.
hinter(line, pos) > The command line hint handler. It gets called on every key insert to
determine what text to use as an inline hint. It is passed the current
line and cursor position. It is expected to return a string which is used
as the text for the hint. This is by default a shim. To set hints,
override this function with your custom handler.
inputMode(mode) > Sets the input mode for Hilbish's line reader. Accepts either emacs or vim

View File

@ -16,7 +16,7 @@ function hilbish.appendPath(dir) end
--- replacing <cmd> with the name of the command (for example `command.git`).
--- `cb` must be a function that returns a table of "completion groups."
--- A completion group is a table with the keys `items` and `type`.
--- `items` being a table of items and `type` being the display type of
--- `items` being a table of items and `type` being the display type, which is
--- `grid` (the normal file completion display) or `list` (with a description)
--- @param scope string
--- @param cb function
@ -33,19 +33,21 @@ function hilbish.exec(cmd) end
--- @param fn function
function hilbish.goro(fn) end
--- Sets the highlighter function. This is mainly for syntax hightlighting, but in
--- reality could set the input of the prompt to display anything. The callback
--- is passed the current line as typed and is expected to return a line that will
--- be used to display in the line.
--- @param cb function
function hilbish.highlighter(cb) end
--- Line highlighter handler. This is mainly for syntax highlighting, but in
--- reality could set the input of the prompt to *display* anything. The
--- callback is passed the current line and is expected to return a line that
--- will be used as the input display.
--- @param line string
function hilbish.highlighter(line) end
--- Sets the hinter function. This will be called on every key insert to determine
--- what text to use as an inline hint. The callback is passed 2 arguments:
--- the current line and the position. It is expected to return a string
--- which will be used for the hint.
--- @param cb function
function hilbish.hinter(cb) end
--- The command line hint handler. It gets called on every key insert to
--- determine what text to use as an inline hint. It is passed the current
--- line and cursor position. It is expected to return a string which is used
--- as the text for the hint. This is by default a shim. To set hints,
--- override this function with your custom handler.
--- @param line string
--- @param pos int
function hilbish.hinter(line, pos) end
--- Sets the input mode for Hilbish's line reader. Accepts either emacs or vim
--- @param mode string