From 7b87dc6bf99a4c75b6a4af2bd1d27bc183e99df7 Mon Sep 17 00:00:00 2001 From: sammy-ette Date: Fri, 13 Jun 2025 03:27:54 +0000 Subject: [PATCH] deploy: c26b250018aee4f557fbf2051120005f97f092fd --- .../readline-move/docs/api/bait/index.html | 2 +- .../docs/api/commander/index.html | 2 +- versions/readline-move/docs/api/fs/index.html | 2 +- .../api/hilbish/hilbish.aliases/index.html | 2 +- .../api/hilbish/hilbish.completion/index.html | 2 +- .../api/hilbish/hilbish.editor/index.html | 19 +++++++++++++ .../api/hilbish/hilbish.history/index.html | 18 ++++++++++++ .../docs/api/hilbish/hilbish.jobs/index.html | 28 +++++++++++++++++++ .../api/hilbish/hilbish.module/index.html | 28 +++++++++++++++++++ .../docs/api/hilbish/hilbish.os/index.html | 7 +++++ .../api/hilbish/hilbish.runner/index.html | 2 +- .../api/hilbish/hilbish.timers/index.html | 26 +++++++++++++++++ .../api/hilbish/hilbish.userdir/index.html | 2 +- .../readline-move/docs/api/hilbish/index.html | 8 ++++-- .../readline-move/docs/api/hilbish/index.xml | 13 +++++++-- versions/readline-move/docs/api/index.html | 2 +- versions/readline-move/docs/api/index.xml | 3 +- .../docs/api/readline/index.html | 9 ++++-- .../readline-move/docs/api/snail/index.html | 2 +- .../docs/api/terminal/index.html | 2 +- .../readline-move/docs/completions/index.html | 2 +- versions/readline-move/docs/faq/index.html | 2 +- .../readline-move/docs/features/index.html | 2 +- .../docs/features/notifications/index.html | 2 +- .../docs/features/opts/index.html | 2 +- .../docs/features/runner-mode/index.html | 2 +- .../docs/getting-started/index.html | 2 +- .../docs/hooks/command/index.html | 2 +- .../docs/hooks/hilbish/index.html | 2 +- versions/readline-move/docs/hooks/index.html | 2 +- .../docs/hooks/signal/index.html | 2 +- versions/readline-move/docs/index.html | 2 +- .../readline-move/docs/lunacolors/index.html | 2 +- .../readline-move/docs/nature/dirs/index.html | 2 +- .../readline-move/docs/nature/doc/index.html | 2 +- versions/readline-move/docs/nature/index.html | 2 +- .../docs/vim-mode/actions/index.html | 2 +- .../readline-move/docs/vim-mode/index.html | 2 +- versions/readline-move/index.xml | 16 ++++++++--- versions/readline-move/sitemap.xml | 2 +- 40 files changed, 191 insertions(+), 42 deletions(-) create mode 100644 versions/readline-move/docs/api/hilbish/hilbish.editor/index.html create mode 100644 versions/readline-move/docs/api/hilbish/hilbish.history/index.html create mode 100644 versions/readline-move/docs/api/hilbish/hilbish.jobs/index.html create mode 100644 versions/readline-move/docs/api/hilbish/hilbish.module/index.html create mode 100644 versions/readline-move/docs/api/hilbish/hilbish.os/index.html create mode 100644 versions/readline-move/docs/api/hilbish/hilbish.timers/index.html diff --git a/versions/readline-move/docs/api/bait/index.html b/versions/readline-move/docs/api/bait/index.html index 10f85340..cf4e5662 100644 --- a/versions/readline-move/docs/api/bait/index.html +++ b/versions/readline-move/docs/api/bait/index.html @@ -1,7 +1,7 @@ Module bait — Hilbish

Module bait

the event emitter

Introduction +

Module bait

the event emitter

Introduction

Bait is the event emitter for Hilbish. Much like Node.js and its events system, many actions in Hilbish emit events. Unlike Node.js, Hilbish events are global. So make sure to diff --git a/versions/readline-move/docs/api/commander/index.html b/versions/readline-move/docs/api/commander/index.html index e90b1327..6a7825f5 100644 --- a/versions/readline-move/docs/api/commander/index.html +++ b/versions/readline-move/docs/api/commander/index.html @@ -1,7 +1,7 @@ Module commander — Hilbish

Module commander

library for custom commands

Introduction +

Module commander

library for custom commands

Introduction

Commander is the library which handles Hilbish commands. This makes the user able to add Lua-written commands to their shell without making a separate script in a bin folder. Instead, you may simply use the Commander diff --git a/versions/readline-move/docs/api/fs/index.html b/versions/readline-move/docs/api/fs/index.html index 0b88808a..dba2fae2 100644 --- a/versions/readline-move/docs/api/fs/index.html +++ b/versions/readline-move/docs/api/fs/index.html @@ -1,7 +1,7 @@ Module fs — Hilbish

Module fs

filesystem interaction and functionality library

Introduction +

Module fs

filesystem interaction and functionality library

Introduction

The fs module provides filesystem functions to Hilbish. While Lua’s standard library has some I/O functions, they’re missing a lot of the basics. The fs library offers more functions and will work on any operating system Hilbish does.

Functions diff --git a/versions/readline-move/docs/api/hilbish/hilbish.aliases/index.html b/versions/readline-move/docs/api/hilbish/hilbish.aliases/index.html index 53d45d24..25037494 100644 --- a/versions/readline-move/docs/api/hilbish/hilbish.aliases/index.html +++ b/versions/readline-move/docs/api/hilbish/hilbish.aliases/index.html @@ -1,7 +1,7 @@ Module hilbish.aliases — Hilbish

Module hilbish.aliases

command aliasing

Introduction +

Module hilbish.aliases

command aliasing

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) -> string?Resolves an alias to its original command. Will thrown an error if the alias doesn’t exist.

hilbish.aliases.add(alias, cmd) diff --git a/versions/readline-move/docs/api/hilbish/hilbish.completion/index.html b/versions/readline-move/docs/api/hilbish/hilbish.completion/index.html index 7aac021a..5ffdc133 100644 --- a/versions/readline-move/docs/api/hilbish/hilbish.completion/index.html +++ b/versions/readline-move/docs/api/hilbish/hilbish.completion/index.html @@ -1,7 +1,7 @@ Module hilbish.completion — Hilbish

Module hilbish.completion

tab completions

Introduction +

Module hilbish.completion

tab completions

Introduction

The completions interface deals with tab completions.

Functions

bins(query, ctx, fields) -> entries (table), prefix (string)Return binaries/executables based on the provided parameters.
call(name, query, ctx, fields) -> completionGroups (table), prefix (string)Calls a completer function. This is mainly used to call a command completer, which will have a name
files(query, ctx, fields) -> entries (table), prefix (string)Returns file matches based on the provided parameters.
handler(line, pos)This function contains the general completion handler for Hilbish. This function handles

hilbish.completion.bins(query, ctx, fields) -> entries (table), prefix (string)

Return binaries/executables based on the provided parameters.
This function is meant to be used as a helper in a command completion handler.

Parameters diff --git a/versions/readline-move/docs/api/hilbish/hilbish.editor/index.html b/versions/readline-move/docs/api/hilbish/hilbish.editor/index.html new file mode 100644 index 00000000..dd5a1197 --- /dev/null +++ b/versions/readline-move/docs/api/hilbish/hilbish.editor/index.html @@ -0,0 +1,19 @@ +Module hilbish.editor — Hilbish +

Module hilbish.editor

interactions for Hilbish's line reader

Introduction +

The hilbish.editor interface provides functions to +directly interact with the line editor in use.

Functions +

deleteByAmount(amount)Deletes characters in the line by the given amount.
getLine() -> stringReturns the current input line.
getVimRegister(register) -> stringReturns the text that is at the register.
insert(text)Inserts text into the Hilbish command line.
getChar() -> stringReads a keystroke from the user. This is in a format of something like Ctrl-L.
setVimRegister(register, text)Sets the vim register at register to hold the passed text.

hilbish.editor.deleteByAmount(amount) +

Deletes characters in the line by the given amount.

Parameters +

number amount


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.

Parameters +

string register


hilbish.editor.insert(text) +

Inserts text into the Hilbish command line.

Parameters +

string text


hilbish.editor.getChar() -> string +

Reads a keystroke from the user. This is in a format of something like Ctrl-L.

Parameters +

This function has no parameters.


hilbish.editor.setVimRegister(register, text) +

Sets the vim register at register to hold the passed text.

Parameters +

string register

string text

\ No newline at end of file diff --git a/versions/readline-move/docs/api/hilbish/hilbish.history/index.html b/versions/readline-move/docs/api/hilbish/hilbish.history/index.html new file mode 100644 index 00000000..91122846 --- /dev/null +++ b/versions/readline-move/docs/api/hilbish/hilbish.history/index.html @@ -0,0 +1,18 @@ +Module hilbish.history — Hilbish +

Module hilbish.history

command 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() -> tableRetrieves all history as a table.
clear()Deletes all commands from the history.
get(index)Retrieves a command from the history based on the index.
size() -> numberReturns the amount of commands in the history.

hilbish.history.add(cmd) +

Adds a command to the history.

Parameters +

string cmd


hilbish.history.all() -> table +

Retrieves all history as a table.

Parameters +

This function has no parameters.


hilbish.history.clear() +

Deletes all commands from the history.

Parameters +

This function has no parameters.


hilbish.history.get(index) +

Retrieves a command from the history based on the index.

Parameters +

number index


hilbish.history.size() -> number +

Returns the amount of commands in the history.

Parameters +

This function has no parameters.

\ No newline at end of file diff --git a/versions/readline-move/docs/api/hilbish/hilbish.jobs/index.html b/versions/readline-move/docs/api/hilbish/hilbish.jobs/index.html new file mode 100644 index 00000000..61f21650 --- /dev/null +++ b/versions/readline-move/docs/api/hilbish/hilbish.jobs/index.html @@ -0,0 +1,28 @@ +Module hilbish.jobs — Hilbish +

Module hilbish.jobs

background job management

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)Creates a new job. This function does not run the job. This function is intended to be
all() -> table[@Job]Returns a table of all job objects.
disown(id)Disowns a job. This simply deletes it from the list of jobs without stopping it.
get(id) -> @JobGet a job object via its ID.
last() -> @JobReturns the last added job to the table.

hilbish.jobs.add(cmdstr, args, execPath) +

Creates a new job. This function does not run the job. This function is intended to be
used by runners, but can also be used to create jobs via Lua. Commanders cannot be ran as jobs.

Parameters +

string cmdstr
String that a user would write for the job

table args
Arguments for the commands. Has to include the name of the command.

string execPath
Binary to use to run the command. Needs to be an absolute path.

Example +
1hilbish.jobs.add('go build', {'go', 'build'}, '/usr/bin/go')
+

hilbish.jobs.all() -> table[Job] +

Returns a table of all job objects.

Parameters +

This function has no parameters.


hilbish.jobs.disown(id) +

Disowns a job. This simply deletes it from the list of jobs without stopping it.

Parameters +

number id


hilbish.jobs.get(id) -> Job +

Get a job object via its ID.

Parameters +

This function has no parameters.


hilbish.jobs.last() -> Job +

Returns the last added job to the table.

Parameters +

This function has no parameters.

Types +


Job +

The Job type describes a Hilbish job.

Object properties +

cmdThe user entered command string for the job.
runningWhether the job is running or not.
idThe ID of the job in the job table
pidThe Process ID
exitCodeThe last exit code of the job.
stdoutThe standard output of the job. This just means the normal logs of the process.
stderrThe standard error stream of the process. This (usually) includes error messages of the job.

Methods +

background() +

Puts a job in the background. This acts the same as initially running a job.

foreground() +

Puts a job in the foreground. This will cause it to run like it was +executed normally and wait for it to complete.

start() +

Starts running the job.

stop() +

Stops the job from running.

\ No newline at end of file diff --git a/versions/readline-move/docs/api/hilbish/hilbish.module/index.html b/versions/readline-move/docs/api/hilbish/hilbish.module/index.html new file mode 100644 index 00000000..f2286764 --- /dev/null +++ b/versions/readline-move/docs/api/hilbish/hilbish.module/index.html @@ -0,0 +1,28 @@ +Module hilbish.module — Hilbish +

Module hilbish.module

native module loading

Introduction +

The hilbish.module interface provides a function to load +Hilbish plugins/modules. Hilbish modules are Go-written +plugins (see https://pkg.go.dev/plugin +) that are used to add functionality +to Hilbish that cannot be written in Lua for any reason.

Note that you don’t ever need to use the load function that is here as +modules can be loaded with a require call like Lua C modules, and the +search paths can be changed with the paths property here.

To make a valid native module, the Go plugin has to export a Loader function +with a signature like so: func(*rt.Runtime) rt.Value.

rt in this case refers to the Runtime type at +https://pkg.go.dev/github.com/arnodel/golua@master/runtime#Runtime

Hilbish uses this package as its Lua runtime. You will need to read +it to use it for a native plugin.

Here is some code for an example plugin:

1package main
+2
+3import (
+4	rt "github.com/arnodel/golua/runtime"
+5)
+6
+7func Loader(rtm *rt.Runtime) rt.Value {
+8	return rt.StringValue("hello world!")
+9}
+

This can be compiled with go build -buildmode=plugin plugin.go. +If you attempt to require and print the result (print(require 'plugin')), it will show “hello world!”

Functions +

load(path)Loads a module at the designated path.

Static module fields +

pathsA list of paths to search when loading native modules. This is in the style of Lua search paths and will be used when requiring native modules. Example: ?.so;?/?.so

hilbish.module.load(path) +

Loads a module at the designated path.
It will throw if any error occurs.

Parameters +

string path

\ No newline at end of file diff --git a/versions/readline-move/docs/api/hilbish/hilbish.os/index.html b/versions/readline-move/docs/api/hilbish/hilbish.os/index.html new file mode 100644 index 00000000..c94d12c7 --- /dev/null +++ b/versions/readline-move/docs/api/hilbish/hilbish.os/index.html @@ -0,0 +1,7 @@ +Module hilbish.os — Hilbish +
\ No newline at end of file diff --git a/versions/readline-move/docs/api/hilbish/hilbish.runner/index.html b/versions/readline-move/docs/api/hilbish/hilbish.runner/index.html index 671393bb..5888abaa 100644 --- a/versions/readline-move/docs/api/hilbish/hilbish.runner/index.html +++ b/versions/readline-move/docs/api/hilbish/hilbish.runner/index.html @@ -1,7 +1,7 @@ Module hilbish.runner — Hilbish

Module hilbish.runner

interactive command runner customization

Introduction +

Module hilbish.runner

interactive command runner customization

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 diff --git a/versions/readline-move/docs/api/hilbish/hilbish.timers/index.html b/versions/readline-move/docs/api/hilbish/hilbish.timers/index.html new file mode 100644 index 00000000..460dc97b --- /dev/null +++ b/versions/readline-move/docs/api/hilbish/hilbish.timers/index.html @@ -0,0 +1,26 @@ +Module hilbish.timers — Hilbish +

Module hilbish.timers

timeout and interval API

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, or Module hilbish on the Website).

An example of usage:

1local t = hilbish.timers.create(hilbish.timers.TIMEOUT, 5000, function()
+2	print 'hello!'
+3end)
+4
+5t:start()
+6print(t.running) // true
+

Functions +

create(type, time, callback) -> @TimerCreates a timer that runs based on the specified time.
get(id) -> @TimerRetrieves a timer via its ID.

Static module fields +

INTERVALConstant for an interval timer type
TIMEOUTConstant for a timeout timer type

hilbish.timers.create(type, time, callback) -> Timer +

Creates a timer that runs based on the specified time.

Parameters +

number type
What kind of timer to create, can either be hilbish.timers.INTERVAL or hilbish.timers.TIMEOUT

number time
The amount of time the function should run in milliseconds.

function callback
The function to run for the timer.


hilbish.timers.get(id) -> Timer +

Retrieves a timer via its ID.

Parameters +

number id

Types +


Timer +

The Job type describes a Hilbish timer.

Object properties +

typeWhat type of timer it is
runningIf the timer is running
durationThe duration in milliseconds that the timer will run

Methods +

start() +

Starts a timer.

stop() +

Stops a timer.

\ No newline at end of file diff --git a/versions/readline-move/docs/api/hilbish/hilbish.userdir/index.html b/versions/readline-move/docs/api/hilbish/hilbish.userdir/index.html index 2bd604a9..f89cca5f 100644 --- a/versions/readline-move/docs/api/hilbish/hilbish.userdir/index.html +++ b/versions/readline-move/docs/api/hilbish/hilbish.userdir/index.html @@ -1,7 +1,7 @@ Module hilbish.userDir — Hilbish

Module hilbish.userDir

user-related directories

Introduction +

Module hilbish.userDir

user-related directories

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.

Static module fields diff --git a/versions/readline-move/docs/api/hilbish/index.html b/versions/readline-move/docs/api/hilbish/index.html index 6f5b0ba3..73259c47 100644 --- a/versions/readline-move/docs/api/hilbish/index.html +++ b/versions/readline-move/docs/api/hilbish/index.html @@ -1,7 +1,7 @@ Module hilbish — Hilbish

Module hilbish

the core Hilbish API

Introduction +

Module hilbish

the core Hilbish API

Introduction

The Hilbish module includes the core API, containing interfaces and functions which directly relate to shell functionality.

Functions

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)
complete(scope, cb)Registers a completion handler for the specified scope.
cwd() -> stringReturns the current directory of the shell.
exec(cmd)Replaces the currently running Hilbish instance with the supplied command.
goro(fn)Puts fn in a Goroutine.
highlighter(line)Line highlighter handler.
hinter(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.
interval(cb, time) -> @TimerRuns the cb function every specified amount of time.
multiprompt(str)Changes the text prompt when Hilbish asks for more input.
prependPath(dir)Prepends dir to $PATH.
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.
timeout(cb, time) -> @TimerExecuted the cb function after a period of time.
which(name) -> stringChecks if name is a valid command.

Static module fields @@ -62,8 +62,10 @@ interfaces and functions which directly relate to shell functionality.

string line

Example
1--This code will highlight all double quoted strings in green.
 2function hilbish.highlighter(line)
-3   return line:gsub('"%w+"', function(c) return lunacolors.green(c) end)
-4end
+3
+4	return line:gsub('"%w+"', function(c) return lunacolors.green(c) end)
+5
+6end
 

hilbish.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.

Parameters

string line

number pos
Position of cursor in line. Usually equals string.len(line)

Example diff --git a/versions/readline-move/docs/api/hilbish/index.xml b/versions/readline-move/docs/api/hilbish/index.xml index a79d7a25..6784475b 100644 --- a/versions/readline-move/docs/api/hilbish/index.xml +++ b/versions/readline-move/docs/api/hilbish/index.xml @@ -1,6 +1,15 @@ Module hilbish on Hilbishhttps://rosettea.github.io/Hilbish/versions/readline-move/docs/api/hilbish/Recent content in Module hilbish on HilbishHugo -- gohugo.ioen-usModule hilbish.aliaseshttps://rosettea.github.io/Hilbish/versions/readline-move/docs/api/hilbish/hilbish.aliases/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/versions/readline-move/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) -> string? Resolves an alias to its original command. Will thrown an error if the alias doesn’t exist. hilbish.aliases.add(alias, cmd) This is an alias (ha) for the hilbish.Module hilbish.completionhttps://rosettea.github.io/Hilbish/versions/readline-move/docs/api/hilbish/hilbish.completion/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/versions/readline-move/docs/api/hilbish/hilbish.completion/Introduction The completions interface deals with tab completions. -Functions bins(query, ctx, fields) -> entries (table), prefix (string) Return binaries/executables based on the provided parameters. call(name, query, ctx, fields) -> completionGroups (table), prefix (string) Calls a completer function. This is mainly used to call a command completer, which will have a name files(query, ctx, fields) -> entries (table), prefix (string) Returns file matches based on the provided parameters. handler(line, pos) This function contains the general completion handler for Hilbish.Module hilbish.runnerhttps://rosettea.github.io/Hilbish/versions/readline-move/docs/api/hilbish/hilbish.runner/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/versions/readline-move/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 bins(query, ctx, fields) -> entries (table), prefix (string) Return binaries/executables based on the provided parameters. call(name, query, ctx, fields) -> completionGroups (table), prefix (string) Calls a completer function. This is mainly used to call a command completer, which will have a name files(query, ctx, fields) -> entries (table), prefix (string) Returns file matches based on the provided parameters. handler(line, pos) This function contains the general completion handler for Hilbish.Module hilbish.editorhttps://rosettea.github.io/Hilbish/versions/readline-move/docs/api/hilbish/hilbish.editor/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/versions/readline-move/docs/api/hilbish/hilbish.editor/Introduction The hilbish.editor interface provides functions to directly interact with the line editor in use. +Functions deleteByAmount(amount) Deletes characters in the line by the given amount. getLine() -> string Returns the current input line. getVimRegister(register) -> string Returns the text that is at the register. insert(text) Inserts text into the Hilbish command line. getChar() -> string Reads a keystroke from the user. This is in a format of something like Ctrl-L.Module hilbish.historyhttps://rosettea.github.io/Hilbish/versions/readline-move/docs/api/hilbish/hilbish.history/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/versions/readline-move/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 as a table. clear() Deletes all commands from the history. get(index) Retrieves a command from the history based on the index. size() -> number Returns the amount of commands in the history. hilbish.Module hilbish.jobshttps://rosettea.github.io/Hilbish/versions/readline-move/docs/api/hilbish/hilbish.jobs/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/versions/readline-move/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) Creates a new job. This function does not run the job. This function is intended to be all() -> table[@Job] Returns a table of all job objects. disown(id) Disowns a job. This simply deletes it from the list of jobs without stopping it.Module hilbish.modulehttps://rosettea.github.io/Hilbish/versions/readline-move/docs/api/hilbish/hilbish.module/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/versions/readline-move/docs/api/hilbish/hilbish.module/Introduction The hilbish.module interface provides a function to load Hilbish plugins/modules. Hilbish modules are Go-written plugins (see https://pkg.go.dev/plugin ) that are used to add functionality to Hilbish that cannot be written in Lua for any reason. +Note that you don’t ever need to use the load function that is here as modules can be loaded with a require call like Lua C modules, and the search paths can be changed with the paths property here.Module hilbish.oshttps://rosettea.github.io/Hilbish/versions/readline-move/docs/api/hilbish/hilbish.os/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/versions/readline-move/docs/api/hilbish/hilbish.os/ Introduction Provides simple text information properties about the current operating system. This mainly includes the name and version. +Static module fields family Family name of the current OS name Pretty name of the current OS version Version of the current OSModule hilbish.runnerhttps://rosettea.github.io/Hilbish/versions/readline-move/docs/api/hilbish/hilbish.runner/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/versions/readline-move/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. Runners are functions that evaluate user input. The default runners in Hilbish can run shell script and Lua code. -A runner is passed the input and has to return a table with these values.Module hilbish.userDirhttps://rosettea.github.io/Hilbish/versions/readline-move/docs/api/hilbish/hilbish.userdir/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/versions/readline-move/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. +A runner is passed the input and has to return a table with these values.Module hilbish.timershttps://rosettea.github.io/Hilbish/versions/readline-move/docs/api/hilbish/hilbish.timers/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/versions/readline-move/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, or Module hilbish on the Website). +An example of usage: +1local t = hilbish.timers.create(hilbish.timers.TIMEOUT, 5000, function() 2 print 'hello!Module hilbish.userDirhttps://rosettea.github.io/Hilbish/versions/readline-move/docs/api/hilbish/hilbish.userdir/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/versions/readline-move/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. Static module fields config The user’s config directory data The user’s directory for program data \ No newline at end of file diff --git a/versions/readline-move/docs/api/index.html b/versions/readline-move/docs/api/index.html index 33259650..09dcaf83 100644 --- a/versions/readline-move/docs/api/index.html +++ b/versions/readline-move/docs/api/index.html @@ -1,5 +1,5 @@ API — Hilbish

API

Welcome to the API documentation for Hilbish. This documents Lua functions +

\ No newline at end of file diff --git a/versions/readline-move/docs/api/index.xml b/versions/readline-move/docs/api/index.xml index 05fd9c16..cf4c3b0c 100644 --- a/versions/readline-move/docs/api/index.xml +++ b/versions/readline-move/docs/api/index.xml @@ -2,8 +2,7 @@ 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/readline-move/docs/api/commander/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/versions/readline-move/docs/api/commander/Introduction Commander is the library which handles Hilbish commands. This makes the user able to add Lua-written commands to their shell without making a separate script in a bin folder. Instead, you may simply use the Commander library in your Hilbish config. 1local commander = require 'commander' 2 3commander.register('hello', function(args, sinks) 4 sinks.out:writeln 'Hello world!' 5end) In this example, a command with the name of hello is created that will print Hello world!Module fshttps://rosettea.github.io/Hilbish/versions/readline-move/docs/api/fs/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/versions/readline-move/docs/api/fs/Introduction The fs module provides filesystem functions to Hilbish. While Lua’s standard library has some I/O functions, they’re missing a lot of the basics. The fs library offers more functions and will work on any operating system Hilbish does. Functions abs(path) -> string Returns an absolute version of the path. basename(path) -> string Returns the “basename,” or the last part of the provided path. If path is empty, cd(dir) Changes Hilbish’s directory to dir.Module readlinehttps://rosettea.github.io/Hilbish/versions/readline-move/docs/api/readline/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/versions/readline-move/docs/api/readline/Introduction This package is designed to be run independently from murex and at some point it will be separated into it’s own git repository (at a stage when I am confident that murex will no longer be the primary driver for features, bugs or other code changes) -Package terminal provides support functions for dealing with terminals, as commonly found on UNIX systems. -Putting a terminal into raw mode is the most common requirement:Module snailhttps://rosettea.github.io/Hilbish/versions/readline-move/docs/api/snail/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/versions/readline-move/docs/api/snail/Introduction The snail library houses Hilbish’s Lua wrapper of its shell script interpreter. It’s not very useful other than running shell scripts, which can be done with other Hilbish functions. +line reader library The readline module is responsible for reading input from the user. The readline module is what Hilbish uses to read input from the user, including all the interactive features of Hilbish like history search, syntax highlighting, everything.Module snailhttps://rosettea.github.io/Hilbish/versions/readline-move/docs/api/snail/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/versions/readline-move/docs/api/snail/Introduction The snail library houses Hilbish’s Lua wrapper of its shell script interpreter. It’s not very useful other than running shell scripts, which can be done with other Hilbish functions. Functions new() -> @Snail Creates a new Snail instance. snail.new() -> Snail Creates a new Snail instance. Parameters This function has no parameters. Types Snail A Snail is a shell script interpreter instance. diff --git a/versions/readline-move/docs/api/readline/index.html b/versions/readline-move/docs/api/readline/index.html index 4df91c73..f4a00a5a 100644 --- a/versions/readline-move/docs/api/readline/index.html +++ b/versions/readline-move/docs/api/readline/index.html @@ -1,11 +1,16 @@ Module readline — Hilbish

Module readline

Package readline is a pure-Go re-imagining of the UNIX readline API

Introduction +

Module readline

Package readline is a pure-Go re-imagining of the UNIX readline API

Introduction

This package is designed to be run independently from murex and at some point it will be separated into it’s own git repository (at a stage when I am confident that murex will no longer be the primary driver for features, -bugs or other code changes)

Package terminal provides support functions for dealing with terminals, as +bugs or other code changes)

line reader library +The readline module is responsible for reading input from the user. +The readline module is what Hilbish uses to read input from the user, +including all the interactive features of Hilbish like history search, +syntax highlighting, everything. The global Hilbish readline instance +is usable at hilbish.editor.

Package terminal provides support functions for dealing with terminals, as commonly found on UNIX systems.

Putting a terminal into raw mode is the most common requirement:

oldState, err := terminal.MakeRaw(0)
 if err != nil {
         panic(err)
diff --git a/versions/readline-move/docs/api/snail/index.html b/versions/readline-move/docs/api/snail/index.html
index c89ee6c6..0e2992d2 100644
--- a/versions/readline-move/docs/api/snail/index.html
+++ b/versions/readline-move/docs/api/snail/index.html
@@ -1,7 +1,7 @@
 Module snail — Hilbish
 

Module snail

shell script interpreter library

Introduction +

Module snail

shell script interpreter library

Introduction

The snail library houses Hilbish’s Lua wrapper of its shell script interpreter. It’s not very useful other than running shell scripts, which can be done with other Hilbish functions.

Functions diff --git a/versions/readline-move/docs/api/terminal/index.html b/versions/readline-move/docs/api/terminal/index.html index c063dc1c..0f058e0f 100644 --- a/versions/readline-move/docs/api/terminal/index.html +++ b/versions/readline-move/docs/api/terminal/index.html @@ -1,7 +1,7 @@ Module terminal — Hilbish

Module terminal

low level terminal library

Introduction +

Module terminal

low level terminal library

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 into 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

Parameters diff --git a/versions/readline-move/docs/completions/index.html b/versions/readline-move/docs/completions/index.html index ca01d5b6..6c73c3be 100644 --- a/versions/readline-move/docs/completions/index.html +++ b/versions/readline-move/docs/completions/index.html @@ -1,7 +1,7 @@ Completions — Hilbish

Completions

Tab completion for commands.

Completions for commands can be created with the hilbish.complete +

Completions

Tab completion for commands.

Completions for commands can be created with the hilbish.complete function. See the link for how to use it.

To create completions for a command is simple. The callback will be passed 3 parameters: