Hilbish is configured and scripted in the Lua programming language.
diff --git a/versions/doc-improvements/index.xml b/versions/doc-improvements/index.xml
index 49009a2..fcfc400 100644
--- a/versions/doc-improvements/index.xml
+++ b/versions/doc-improvements/index.xml
@@ -18,19 +18,18 @@ For the latest stable release, check here: https://github.com/Rosettea/Hilbish/r
Usage of the Bait module consists of userstanding event-driven architecture, but it’s pretty simple: If you want to act on a certain event, you can catch it. You can act on events via callback functions.- Module commanderhttps://rosettea.github.io/Hilbish/versions/doc-improvements/docs/api/commander/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/versions/doc-improvements/docs/api/commander/Introduction Commander is a library for writing custom commands in Lua. In order to make it easier to write commands for Hilbish, not require separate scripts and to be able to use in a config, the Commander library exists. This is like a very simple wrapper that works with Hilbish for writing commands. Example:
local commander = require 'commander' commander.register('hello', function(args, sinks) sinks.out:writeln 'Hello world!' end) In this example, a command with the name of hello is created that will print Hello world!
- Module fshttps://rosettea.github.io/Hilbish/versions/doc-improvements/docs/api/fs/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/versions/doc-improvements/docs/api/fs/Introduction The fs module provides easy and simple access to filesystem functions and other things, and acts an addition to the Lua standard library’s I/O and filesystem functions.
Functions abs(path) -> string Gives an absolute version of path. basename(path) -> string Gives the basename of path. For the rules, cd(dir) Changes directory to dir dir(path) -> string Returns the directory part of path. For the rules, see Go’s glob(pattern) -> matches (table) Glob all files and directories that match the pattern.
- Module hilbish.aliaseshttps://rosettea.github.io/Hilbish/versions/doc-improvements/docs/api/hilbish/hilbish.aliases/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/versions/doc-improvements/docs/api/hilbish/hilbish.aliases/Introduction The alias interface deals with all command aliases in Hilbish.
-Functions add(alias, cmd) This is an alias (ha) for the hilbish.alias function. delete(name) Removes an alias. list() -> table<string, string> Get a table of all aliases, with string keys as the alias and the value as the command. resolve(alias) -> command (string) Tries to resolve an alias to its command. hilbish.aliases.add(alias, cmd) This is an alias (ha) for the hilbish.
- Module hilbish.completionshttps://rosettea.github.io/Hilbish/versions/doc-improvements/docs/api/hilbish/hilbish.completions/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/versions/doc-improvements/docs/api/hilbish/hilbish.completions/Introduction The completions interface deals with tab completions.
+Functions add(alias, cmd) This is an alias (ha) for the hilbish.alias function. delete(name) Removes an alias. list() -> table<string, string> Get a table of all aliases, with string keys as the alias and the value as the command. resolve(alias) -> command (string) Tries to resolve an alias to its command. Functions hilbish.aliases.add(alias, cmd) This is an alias (ha) for the hilbish.
- Module hilbish.completionshttps://rosettea.github.io/Hilbish/versions/doc-improvements/docs/api/hilbish/hilbish.completions/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/versions/doc-improvements/docs/api/hilbish/hilbish.completions/Introduction The completions interface deals with tab completions.
Functions call(name, query, ctx, fields) -> completionGroups (table), prefix (string) Calls a completer function. This is mainly used to call handler(line, pos) The handler function is the callback for tab completion in Hilbish. bins(query, ctx, fields) -> entries (table), prefix (string) Returns binary/executale completion candidates based on the provided query. files(query, ctx, fields) -> entries (table), prefix (string) Returns file completion candidates based on the provided query.
- Module hilbish.editorhttps://rosettea.github.io/Hilbish/versions/doc-improvements/docs/api/hilbish/hilbish.editor/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/versions/doc-improvements/docs/api/hilbish/hilbish.editor/Introduction The hilbish.editor interface provides functions to directly interact with the line editor in use.
-Functions getLine() -> string Returns the current input line. getVimRegister(register) -> string Returns the text that is at the register. insert(text) Inserts text into the line. setVimRegister(register, text) Sets the vim register at register to hold the passed text. hilbish.editor.getLine() -> string Returns the current input line.
-Parameters This function has no parameters.
-hilbish.editor.getVimRegister(register) -> string Returns the text that is at the register.
- Module hilbish.historyhttps://rosettea.github.io/Hilbish/versions/doc-improvements/docs/api/hilbish/hilbish.history/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/versions/doc-improvements/docs/api/hilbish/hilbish.history/Introduction The history interface deals with command history. This includes the ability to override functions to change the main method of saving history.
-Functions 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() -> number Returns the amount of commands in the history. hilbish.history.add(cmd) Adds a command to the history.
- Module hilbish.jobshttps://rosettea.github.io/Hilbish/versions/doc-improvements/docs/api/hilbish/hilbish.jobs/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/versions/doc-improvements/docs/api/hilbish/hilbish.jobs/Introduction Manage interactive jobs in Hilbish via Lua.
+Functions getLine() -> string Returns the current input line. getVimRegister(register) -> string Returns the text that is at the register. insert(text) Inserts text into the line. setVimRegister(register, text) Sets the vim register at register to hold the passed text. Functions hilbish.editor.getLine() -> string Returns the current input line.
+Parameters This function has no parameters.
- Module hilbish.historyhttps://rosettea.github.io/Hilbish/versions/doc-improvements/docs/api/hilbish/hilbish.history/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/versions/doc-improvements/docs/api/hilbish/hilbish.history/Introduction The history interface deals with command history. This includes the ability to override functions to change the main method of saving history.
+Functions 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() -> number Returns the amount of commands in the history. Functions hilbish.history.add(cmd) Adds a command to the history.
- Module hilbish.jobshttps://rosettea.github.io/Hilbish/versions/doc-improvements/docs/api/hilbish/hilbish.jobs/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/versions/doc-improvements/docs/api/hilbish/hilbish.jobs/Introduction Manage interactive jobs in Hilbish via Lua.
Jobs are the name of background tasks/commands. A job can be started via interactive usage or with the functions defined below for use in external runners.
Functions add(cmdstr, args, execPath) Adds a new job to the job table. Note that this does not immediately run it. all() -> table<@Job> Returns a table of all job objects. disown(id) Disowns a job. This deletes it from the job table.
- Module hilbish.oshttps://rosettea.github.io/Hilbish/versions/doc-improvements/docs/api/hilbish/hilbish.os/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/versions/doc-improvements/docs/api/hilbish/hilbish.os/ Introduction The os interface provides simple text information properties about the current OS on the systen. This mainly includes the name and version.
-Interface fields family: Family name of the current OS name: Pretty name of the current OS version: Version of the current OS
- Module hilbish.runnerhttps://rosettea.github.io/Hilbish/versions/doc-improvements/docs/api/hilbish/hilbish.runner/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/versions/doc-improvements/docs/api/hilbish/hilbish.runner/Introduction The runner interface contains functions that allow the user to change how Hilbish interprets interactive input. Users can add and change the default runner for interactive input to any language or script of their choosing. A good example is using it to write command in Fennel.
+Interface fields family Family name of the current OS name Pretty name of the current OS version Version of the current OS
- Module hilbish.runnerhttps://rosettea.github.io/Hilbish/versions/doc-improvements/docs/api/hilbish/hilbish.runner/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/versions/doc-improvements/docs/api/hilbish/hilbish.runner/Introduction The runner interface contains functions that allow the user to change how Hilbish interprets interactive input. Users can add and change the default runner for interactive input to any language or script of their choosing. A good example is using it to write command in Fennel.
Functions setMode(cb) This is the same as the hilbish.runnerMode function. It takes a callback, lua(cmd) Evaluates cmd as Lua input. This is the same as using dofile sh(cmd) Runs a command in Hilbish’s shell script interpreter.
- Module hilbish.timershttps://rosettea.github.io/Hilbish/versions/doc-improvements/docs/api/hilbish/hilbish.timers/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/versions/doc-improvements/docs/api/hilbish/hilbish.timers/Introduction If you ever want to run a piece of code on a timed interval, or want to wait a few seconds, you don’t have to rely on timing tricks, as Hilbish has a timer API to set intervals and timeouts.
These are the simple functions hilbish.interval and hilbish.timeout (doc accessible with doc hilbish). But if you want slightly more control over them, there is the hilbish.timers interface. It allows you to get a timer via ID and control them.
- Module hilbish.userDirhttps://rosettea.github.io/Hilbish/versions/doc-improvements/docs/api/hilbish/hilbish.userdir/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/versions/doc-improvements/docs/api/hilbish/hilbish.userdir/ Introduction This interface just contains properties to know about certain user directories. It is equivalent to XDG on Linux and gets the user’s preferred directories for configs and data.
-Interface fields config: The user’s config directory data: The user’s directory for program data
- Module terminalhttps://rosettea.github.io/Hilbish/versions/doc-improvements/docs/api/terminal/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/versions/doc-improvements/docs/api/terminal/Introduction The terminal library is a simple and lower level library for certain terminal interactions.
-Functions restoreState() Restores the last saved state of the terminal saveState() Saves the current state of the terminal setRaw() Puts the terminal in raw mode size() Gets the dimensions of the terminal. Returns a table with width and height terminal.restoreState() Restores the last saved state of the terminal
+Interface fields config The user’s config directory data The user’s directory for program data
- Module terminalhttps://rosettea.github.io/Hilbish/versions/doc-improvements/docs/api/terminal/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/versions/doc-improvements/docs/api/terminal/Introduction The terminal library is a simple and lower level library for certain terminal interactions.
+Functions restoreState() Restores the last saved state of the terminal saveState() Saves the current state of the terminal setRaw() Puts the terminal in raw mode size() Gets the dimensions of the terminal. Returns a table with width and height Functions terminal.restoreState() Restores the last saved state of the terminal
Parameters This function has no parameters.
- Notificationhttps://rosettea.github.io/Hilbish/versions/doc-improvements/docs/features/notifications/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/versions/doc-improvements/docs/features/notifications/Hilbish features a simple notification system which can be used by other plugins and parts of the shell to notify the user of various actions. This is used via the hilbish.message interface.
A message is defined as a table with the following properties:
icon: A unicode/emoji icon for the notification. title: The title of the message text: Message text/body channel: The source of the message. This should be a unique and easily readable text identifier.
- Runner Modehttps://rosettea.github.io/Hilbish/versions/doc-improvements/docs/features/runner-mode/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/versions/doc-improvements/docs/features/runner-mode/Hilbish allows you to change how interactive text can be interpreted. This is mainly due to the fact that the default method Hilbish uses is that it runs Lua first and then falls back to shell script.
diff --git a/versions/doc-improvements/install/index.html b/versions/doc-improvements/install/index.html
index 57720e7..70c8c67 100644
--- a/versions/doc-improvements/install/index.html
+++ b/versions/doc-improvements/install/index.html
@@ -1,5 +1,5 @@
Install — Hilbish
-