diff --git a/cmd/docgen/docgen.go b/cmd/docgen/docgen.go index 3af014d3..e8c6dafa 100644 --- a/cmd/docgen/docgen.go +++ b/cmd/docgen/docgen.go @@ -724,7 +724,7 @@ func table(elems [][]string) string { for _, line := range elems { b.WriteString("\n") for _, col := range line { - b.WriteString("") + b.WriteString("") b.WriteString(col) b.WriteString("\n") } diff --git a/docs/api/bait.md b/docs/api/bait.md index c0ffd416..a9551cff 100644 --- a/docs/api/bait.md +++ b/docs/api/bait.md @@ -41,24 +41,24 @@ this function will set the user prompt. - - + + - - + + - - + + - - + + - - + +
catch(name, cb)Catches an event. This function can be used to act on events.catch(name, cb)Catches an event. This function can be used to act on events.
catchOnce(name, cb)Catches an event, but only once. This will remove the hook immediately after it runs for the first time.catchOnce(name, cb)Catches an event, but only once. This will remove the hook immediately after it runs for the first time.
hooks(name) -> tableReturns a table of functions that are hooked on an event with the corresponding `name`.hooks(name) -> tableReturns a table of functions that are hooked on an event with the corresponding `name`.
release(name, catcher)Removes the `catcher` for the event with `name`.release(name, catcher)Removes the `catcher` for the event with `name`.
throw(name, ...args)Throws a hook with `name` with the provided `args`.throw(name, ...args)Throws a hook with `name` with the provided `args`.
diff --git a/docs/api/commander.md b/docs/api/commander.md index 22809572..ff01eb13 100644 --- a/docs/api/commander.md +++ b/docs/api/commander.md @@ -44,16 +44,16 @@ In the future, `sinks.in` will be removed.\ - - + + - - + + - - + +
deregister(name)Removes the named command. Note that this will only remove Commander-registered commands.deregister(name)Removes the named command. Note that this will only remove Commander-registered commands.
register(name, cb)Adds a new command with the given `name`. When Hilbish has to run a command with a name,register(name, cb)Adds a new command with the given `name`. When Hilbish has to run a command with a name,
registry() -> tableReturns all registered commanders. Returns a list of tables with the following keys:registry() -> tableReturns all registered commanders. Returns a list of tables with the following keys:
diff --git a/docs/api/fs.md b/docs/api/fs.md index 12bcfad5..c22837e6 100644 --- a/docs/api/fs.md +++ b/docs/api/fs.md @@ -21,44 +21,44 @@ library offers more functions and will work on any operating system Hilbish does - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + +
abs(path) -> stringReturns an absolute version of the `path`.abs(path) -> stringReturns an absolute version of the `path`.
basename(path) -> stringReturns the "basename," or the last part of the provided `path`. If path is empty,basename(path) -> stringReturns the "basename," or the last part of the provided `path`. If path is empty,
cd(dir)Changes Hilbish's directory to `dir`.cd(dir)Changes Hilbish's directory to `dir`.
dir(path) -> stringReturns the directory part of `path`. If a file path likedir(path) -> stringReturns the directory part of `path`. If a file path like
glob(pattern) -> matches (table)Match all files based on the provided `pattern`.glob(pattern) -> matches (table)Match all files based on the provided `pattern`.
join(...path) -> stringTakes any list of paths and joins them based on the operating system's path separator.join(...path) -> stringTakes any list of paths and joins them based on the operating system's path separator.
mkdir(name, recursive)Creates a new directory with the provided `name`.mkdir(name, recursive)Creates a new directory with the provided `name`.
fpipe() -> File, FileReturns a pair of connected files, also known as a pipe.fpipe() -> File, FileReturns a pair of connected files, also known as a pipe.
readdir(path) -> table[string]Returns a list of all files and directories in the provided path.readdir(path) -> table[string]Returns a list of all files and directories in the provided path.
stat(path) -> {}Returns the information about a given `path`.stat(path) -> {}Returns the information about a given `path`.
@@ -72,8 +72,8 @@ library offers more functions and will work on any operating system Hilbish does - - + +
pathSepThe operating system's path separator.pathSepThe operating system's path separator.
diff --git a/docs/api/hilbish.md b/docs/api/hilbish.md index 6330ee2c..5cd799bb 100644 --- a/docs/api/hilbish.md +++ b/docs/api/hilbish.md @@ -18,68 +18,68 @@ menu: - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + +
alias(cmd, orig)Sets an alias, with a name of `cmd` to another command.alias(cmd, orig)Sets an alias, with a name of `cmd` to another command.
appendPath(dir)Appends the provided dir to the command path (`$PATH`)appendPath(dir)Appends the provided dir to the command path (`$PATH`)
complete(scope, cb)Registers a completion handler for the specified scope.complete(scope, cb)Registers a completion handler for the specified scope.
cwd() -> stringReturns the current directory of the shell.cwd() -> stringReturns the current directory of the shell.
exec(cmd)Replaces the currently running Hilbish instance with the supplied command.exec(cmd)Replaces the currently running Hilbish instance with the supplied command.
goro(fn)Puts `fn` in a Goroutine.goro(fn)Puts `fn` in a Goroutine.
highlighter(line)Line highlighter handler.highlighter(line)Line highlighter handler.
hinter(line, pos)The command line hint handler. It gets called on every key insert tohinter(line, pos)The command line hint handler. It gets called on every key insert to
inputMode(mode)Sets the input mode for Hilbish's line reader.inputMode(mode)Sets the input mode for Hilbish's line reader.
interval(cb, time) -> @TimerRuns the `cb` function every specified amount of `time`.interval(cb, time) -> @TimerRuns the `cb` function every specified amount of `time`.
multiprompt(str)Changes the text prompt when Hilbish asks for more input.multiprompt(str)Changes the text prompt when Hilbish asks for more input.
prependPath(dir)Prepends `dir` to $PATH.prependPath(dir)Prepends `dir` to $PATH.
prompt(str, typ)Changes the shell prompt to the provided string.prompt(str, typ)Changes the shell prompt to the provided string.
read(prompt) -> input (string)Read input from the user, using Hilbish's line editor/input reader.read(prompt) -> input (string)Read input from the user, using Hilbish's line editor/input reader.
timeout(cb, time) -> @TimerExecuted the `cb` function after a period of `time`.timeout(cb, time) -> @TimerExecuted the `cb` function after a period of `time`.
which(name) -> stringChecks if `name` is a valid command.which(name) -> stringChecks if `name` is a valid command.
diff --git a/docs/api/readline.md b/docs/api/readline.md index 203569e8..c4c54805 100644 --- a/docs/api/readline.md +++ b/docs/api/readline.md @@ -22,8 +22,8 @@ is usable at `hilbish.editor`. - - + +
new() -> @ReadlineCreates a new readline instance.new() -> @ReadlineCreates a new readline instance.
diff --git a/docs/api/snail.md b/docs/api/snail.md index d1b3714c..00f1f8b7 100644 --- a/docs/api/snail.md +++ b/docs/api/snail.md @@ -21,8 +21,8 @@ Hilbish functions. - - + +
new() -> @SnailCreates a new Snail instance.new() -> @SnailCreates a new Snail instance.
diff --git a/docs/api/terminal.md b/docs/api/terminal.md index c4bdc142..0510d9b2 100644 --- a/docs/api/terminal.md +++ b/docs/api/terminal.md @@ -18,20 +18,20 @@ The terminal library is a simple and lower level library for certain terminal in - - + + - - + + - - + + - - + +
restoreState()Restores the last saved state of the terminalrestoreState()Restores the last saved state of the terminal
saveState()Saves the current state of the terminal.saveState()Saves the current state of the terminal.
setRaw()Puts the terminal into raw mode.setRaw()Puts the terminal into raw mode.
size()Gets the dimensions of the terminal. Returns a table with `width` and `height`size()Gets the dimensions of the terminal. Returns a table with `width` and `height`
diff --git a/docs/api/yarn.md b/docs/api/yarn.md index b676a26a..b8c71578 100644 --- a/docs/api/yarn.md +++ b/docs/api/yarn.md @@ -30,8 +30,8 @@ t 'printing from another lua state!' - - + +
thread(fun) -> @ThreadCreates a new, fresh Yarn thread.thread(fun) -> @ThreadCreates a new, fresh Yarn thread.