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