From 824f5bd06d6832b4d25b7def038ce639ec03a633 Mon Sep 17 00:00:00 2001 From: TorchedSammy Date: Fri, 16 Aug 2024 19:26:30 +0000 Subject: [PATCH] docs: [ci] generate new docs --- docs/api/hilbish/hilbish.runner.md | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/docs/api/hilbish/hilbish.runner.md b/docs/api/hilbish/hilbish.runner.md index b5cfde4..8c89a52 100644 --- a/docs/api/hilbish/hilbish.runner.md +++ b/docs/api/hilbish/hilbish.runner.md @@ -21,16 +21,18 @@ A runner is passed the input and has to return a table with these values. All are not required, only the useful ones the runner needs to return. (So if there isn't an error, just omit `err`.) -- `exitCode` (number): A numerical code to indicate the exit result. -- `input` (string): The user input. This will be used to add -to the history. -- `err` (string): A string to indicate an interal error for the runner. -It can be set to a few special values for Hilbish to throw the right hooks and have a better looking message: - -`[command]: not-found` will throw a command.not-found hook based on what `[command]` is. - -`[command]: not-executable` will throw a command.not-executable hook. -- `continue` (boolean): Whether to prompt the user for more input. +- `exitCode` (number): Exit code of the command +- `input` (string): The text input of the user. This is used by Hilbish to append extra input, in case +more is requested. +- `err` (string): A string that represents an error from the runner. +This should only be set when, for example, there is a syntax error. +It can be set to a few special values for Hilbish to throw the right +hooks and have a better looking message. + - `\: not-found` will throw a `command.not-found` hook + based on what `\` is. + - `\: not-executable` will throw a `command.not-executable` hook. +- `continue` (boolean): Whether Hilbish should prompt the user for no input +- `newline` (boolean): Whether a newline should be added at the end of `input`. Here is a simple example of a fennel runner. It falls back to shell script if fennel eval has an error.