diff --git a/versions/doc-improvements/docs/api/bait/index.html b/versions/doc-improvements/docs/api/bait/index.html index cdf290e..d280b42 100644 --- a/versions/doc-improvements/docs/api/bait/index.html +++ b/versions/doc-improvements/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/doc-improvements/docs/api/commander/index.html b/versions/doc-improvements/docs/api/commander/index.html index 5cf741a..865622c 100644 --- a/versions/doc-improvements/docs/api/commander/index.html +++ b/versions/doc-improvements/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/doc-improvements/docs/api/fs/index.html b/versions/doc-improvements/docs/api/fs/index.html index bb24cdf..96d0432 100644 --- a/versions/doc-improvements/docs/api/fs/index.html +++ b/versions/doc-improvements/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/doc-improvements/docs/api/hilbish/hilbish.aliases/index.html b/versions/doc-improvements/docs/api/hilbish/hilbish.aliases/index.html index c70702c..b0b5848 100644 --- a/versions/doc-improvements/docs/api/hilbish/hilbish.aliases/index.html +++ b/versions/doc-improvements/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/doc-improvements/docs/api/hilbish/hilbish.completion/index.html b/versions/doc-improvements/docs/api/hilbish/hilbish.completion/index.html index b4d8af6..cce8bb1 100644 --- a/versions/doc-improvements/docs/api/hilbish/hilbish.completion/index.html +++ b/versions/doc-improvements/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/doc-improvements/docs/api/hilbish/hilbish.editor/index.html b/versions/doc-improvements/docs/api/hilbish/hilbish.editor/index.html index 9895e91..509602b 100644 --- a/versions/doc-improvements/docs/api/hilbish/hilbish.editor/index.html +++ b/versions/doc-improvements/docs/api/hilbish/hilbish.editor/index.html @@ -1,7 +1,7 @@ Module hilbish.editor — Hilbish

Module hilbish.editor

interactions for Hilbish's line reader

Introduction +

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

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.getLine() -> string diff --git a/versions/doc-improvements/docs/api/hilbish/hilbish.history/index.html b/versions/doc-improvements/docs/api/hilbish/hilbish.history/index.html index fccc35f..da37e2b 100644 --- a/versions/doc-improvements/docs/api/hilbish/hilbish.history/index.html +++ b/versions/doc-improvements/docs/api/hilbish/hilbish.history/index.html @@ -1,7 +1,7 @@ Module hilbish.history — Hilbish

Module hilbish.history

command history

Introduction +

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 diff --git a/versions/doc-improvements/docs/api/hilbish/hilbish.jobs/index.html b/versions/doc-improvements/docs/api/hilbish/hilbish.jobs/index.html index 28fe5cf..dc05061 100644 --- a/versions/doc-improvements/docs/api/hilbish/hilbish.jobs/index.html +++ b/versions/doc-improvements/docs/api/hilbish/hilbish.jobs/index.html @@ -1,7 +1,7 @@ Module hilbish.jobs — Hilbish

Module hilbish.jobs

background job management

Introduction +

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) diff --git a/versions/doc-improvements/docs/api/hilbish/hilbish.module/index.html b/versions/doc-improvements/docs/api/hilbish/hilbish.module/index.html index fe62337..3179ac9 100644 --- a/versions/doc-improvements/docs/api/hilbish/hilbish.module/index.html +++ b/versions/doc-improvements/docs/api/hilbish/hilbish.module/index.html @@ -1,7 +1,7 @@ Module hilbish.module — Hilbish

Module hilbish.module

native module loading

Introduction +

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 diff --git a/versions/doc-improvements/docs/api/hilbish/hilbish.os/index.html b/versions/doc-improvements/docs/api/hilbish/hilbish.os/index.html index 1404346..9925186 100644 --- a/versions/doc-improvements/docs/api/hilbish/hilbish.os/index.html +++ b/versions/doc-improvements/docs/api/hilbish/hilbish.os/index.html @@ -1,7 +1,7 @@ Module hilbish.os — Hilbish

Module hilbish.os

operating system info

Introduction +

Module hilbish.os

operating system info

Introduction

Provides simple text information properties about the current operating system. This mainly includes the name and version.

Static module fields

familyFamily name of the current OS
namePretty name of the current OS
versionVersion of the current OS
\ No newline at end of file diff --git a/versions/doc-improvements/docs/api/hilbish/hilbish.runner/index.html b/versions/doc-improvements/docs/api/hilbish/hilbish.runner/index.html index a97fa6e..b7096ed 100644 --- a/versions/doc-improvements/docs/api/hilbish/hilbish.runner/index.html +++ b/versions/doc-improvements/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/doc-improvements/docs/api/hilbish/hilbish.timers/index.html b/versions/doc-improvements/docs/api/hilbish/hilbish.timers/index.html index 54279f4..406a672 100644 --- a/versions/doc-improvements/docs/api/hilbish/hilbish.timers/index.html +++ b/versions/doc-improvements/docs/api/hilbish/hilbish.timers/index.html @@ -1,7 +1,7 @@ Module hilbish.timers — Hilbish

Module hilbish.timers

timeout and interval API

Introduction +

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 diff --git a/versions/doc-improvements/docs/api/hilbish/hilbish.userdir/index.html b/versions/doc-improvements/docs/api/hilbish/hilbish.userdir/index.html index b85822c..073541c 100644 --- a/versions/doc-improvements/docs/api/hilbish/hilbish.userdir/index.html +++ b/versions/doc-improvements/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/doc-improvements/docs/api/hilbish/index.html b/versions/doc-improvements/docs/api/hilbish/index.html index 58d9589..ae074df 100644 --- a/versions/doc-improvements/docs/api/hilbish/index.html +++ b/versions/doc-improvements/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. Accepts either emacs or vim.
interval(cb, time) -> @TimerRuns the cb function every time milliseconds.
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.
run(cmd, returnOut) -> exitCode (number), stdout (string), stderr (string)Runs cmd in Hilbish’s shell script interpreter.
runnerMode(mode)Sets the execution/runner mode for interactive Hilbish. This determines whether
timeout(cb, time) -> @TimerRuns the cb function after time in milliseconds.
which(name) -> stringChecks if name is a valid command.

Static module fields diff --git a/versions/doc-improvements/docs/api/index.html b/versions/doc-improvements/docs/api/index.html index f0478fd..e68167d 100644 --- a/versions/doc-improvements/docs/api/index.html +++ b/versions/doc-improvements/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/doc-improvements/docs/api/terminal/index.html b/versions/doc-improvements/docs/api/terminal/index.html index c1c29db..5564611 100644 --- a/versions/doc-improvements/docs/api/terminal/index.html +++ b/versions/doc-improvements/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/doc-improvements/docs/completions/index.html b/versions/doc-improvements/docs/completions/index.html index d409a36..1e15d27 100644 --- a/versions/doc-improvements/docs/completions/index.html +++ b/versions/doc-improvements/docs/completions/index.html @@ -1,7 +1,7 @@ Completions — Hilbish

Completions

Tab completion for commands.

Hilbish has a pretty good completion system. It has a nice looking +

Completions

Tab completion for commands.

Hilbish has a pretty good completion system. It has a nice looking menu, with 2 types of menus: grid (like file completions) or list.

Like most parts of Hilbish, it’s made to be extensible and customizable. The default handler for completions in general can diff --git a/versions/doc-improvements/docs/faq/index.html b/versions/doc-improvements/docs/faq/index.html index c065c36..8bb0843 100644 --- a/versions/doc-improvements/docs/faq/index.html +++ b/versions/doc-improvements/docs/faq/index.html @@ -5,7 +5,7 @@ Why? Hilbish emerged from the desire of a Lua configured shell." property="og:de Windows Support? It compiles for Windows (CI ensures it does), but otherwise it is not directly supported. If you’d like to improve this situation, checkout the discussion . Why? Hilbish emerged from the desire of a Lua configured shell." name=description>

Frequently Asked Questions

Last updated Nov 12, 2023

Is Hilbish POSIX compliant? +

Frequently Asked Questions

Last updated Nov 12, 2023

Is Hilbish POSIX compliant?

No, it is not. POSIX compliance is a non-goal. Perhaps in the future, someone would be able to write a native plugin to support shell scripting (which would be against it’s main goal, but ….)

Windows Support? diff --git a/versions/doc-improvements/docs/features/index.html b/versions/doc-improvements/docs/features/index.html index f2a9eff..b398aa0 100644 --- a/versions/doc-improvements/docs/features/index.html +++ b/versions/doc-improvements/docs/features/index.html @@ -1,7 +1,7 @@ Features — Hilbish

Features

Last updated Nov 12, 2023

Hilbish has a wide range of features to enhance the user’s experience +

\ No newline at end of file diff --git a/versions/doc-improvements/docs/features/index.xml b/versions/doc-improvements/docs/features/index.xml index 15f7a70..5be4282 100644 --- a/versions/doc-improvements/docs/features/index.xml +++ b/versions/doc-improvements/docs/features/index.xml @@ -1,4 +1,6 @@ Features on Hilbishhttps://rosettea.github.io/Hilbish/versions/doc-improvements/docs/features/Recent content in Features on HilbishHugo -- gohugo.ioen-usNotificationhttps://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. +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.Optionshttps://rosettea.github.io/Hilbish/versions/doc-improvements/docs/features/opts/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/versions/doc-improvements/docs/features/opts/Opts are simple toggle or value options a user can set in Hilbish. As toggles, there are things like autocd or history saving. As values, there is the motd which the user can either change to a custom string or disable. +Opts are accessed from the hilbish.opts table. Here they can either be read or modified +autocd Value: boolean Default: false The autocd opt makes it so that lone directories attempted to be executed are instead set as the shell’s directory.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. In some cases, someone might want to switch to just shell script to avoid it while interactive but still have a Lua config, or go full Lua to use Hilbish as a REPL. This also allows users to add alternative languages like Fennel as the interactive script runner. \ No newline at end of file diff --git a/versions/doc-improvements/docs/features/notifications/index.html b/versions/doc-improvements/docs/features/notifications/index.html index a18e300..57bd5ad 100644 --- a/versions/doc-improvements/docs/features/notifications/index.html +++ b/versions/doc-improvements/docs/features/notifications/index.html @@ -1,7 +1,7 @@ Notification — Hilbish

Notification

Last updated Nov 12, 2023
Get notified of shell actions.

Hilbish features a simple notification system which can be +

Notification

Last updated Nov 12, 2023
Get notified of shell actions.

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: