diff --git a/docs/api/hilbish/hilbish.aliases/index.html b/docs/api/hilbish/hilbish.aliases/index.html index 8241ed4..240160b 100644 --- a/docs/api/hilbish/hilbish.aliases/index.html +++ b/docs/api/hilbish/hilbish.aliases/index.html @@ -2,4 +2,5 @@

Interface 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()

Get a table of all aliases.

resolve(alias)

Tries to resolve an alias to its command.

\ No newline at end of file +

Interface 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() -> aliases (table)

Get a table of all aliases, with string keys as the alias and the value as the command. +@returns table<string, string>

resolve(alias) -> command (string)

Tries to resolve an alias to its command.

\ No newline at end of file diff --git a/docs/api/hilbish/hilbish.jobs/index.html b/docs/api/hilbish/hilbish.jobs/index.html index ea01702..2dc4b2e 100644 --- a/docs/api/hilbish/hilbish.jobs/index.html +++ b/docs/api/hilbish/hilbish.jobs/index.html @@ -4,4 +4,4 @@ Hilbish

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

Object properties

  • cmd: The user entered command string for the job.
  • running: Whether the job is running or not.
  • id: The ID of the job in the job table
  • pid: The Process ID
  • exitCode: The last exit code of the job.
  • stdout: The standard output of the job. This just means the normal logs of the process.
  • stderr: The standard error stream of the process. This (usually) includes error messages of the job.

Functions

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.

add(cmdstr, args, execPath)

Adds a new job to the job table. Note that this does not immediately run it.

all()

Returns a table of all job objects.

disown(id)

Disowns a job. This deletes it from the job table.

get(id)

Get a job object via its ID.

last() -> Job

Returns the last added job from the table.

\ No newline at end of file +executed normally and wait for it to complete.

start()

Starts running the job.

stop()

Stops the job from running.

add(cmdstr, args, execPath)

Adds a new job to the job table. Note that this does not immediately run it.

all() -> jobs (table<Job/Table>)

Returns a table of all job objects.

disown(id)

Disowns a job. This deletes it from the job table.

get(id) -> job (Job/Table)

Get a job object via its ID.

last() -> job (Job/Table)

Returns the last added job from the table.

\ No newline at end of file diff --git a/docs/api/hilbish/hilbish.timers/index.html b/docs/api/hilbish/hilbish.timers/index.html index 52d3cc5..2253cb4 100644 --- a/docs/api/hilbish/hilbish.timers/index.html +++ b/docs/api/hilbish/hilbish.timers/index.html @@ -4,5 +4,5 @@ Hilbish

Interface hilbish.timers

timeout and interval API

Introduction

The timers interface si one to easily set timeouts and intervals to run functions after a certain time or repeatedly without using -odd tricks.

Object properties

  • type: What type of timer it is
  • running: If the timer is running
  • duration: The duration in milliseconds that the timer will run

Functions

start()

Starts a timer.

stop()

Stops a timer.

create(type, time, callback)

Creates a timer that runs based on the specified time in milliseconds. -The type can either be interval (value of 0) or timeout (value of 1).

get(id)

Retrieves a timer via its ID.

\ No newline at end of file +odd tricks.

Interface fields

Object properties

Functions

start()

Starts a timer.

stop()

Stops a timer.

create(type, time, callback)

Creates a timer that runs based on the specified time in milliseconds. +The type can either be hilbish.timers.INTERVAL or hilbish.timers.TIMEOUT

get(id) -> timer (Timer/Table)

Retrieves a timer via its ID.

\ No newline at end of file diff --git a/docs/api/hilbish/index.html b/docs/api/hilbish/index.html index 774025d..c6835d6 100644 --- a/docs/api/hilbish/index.html +++ b/docs/api/hilbish/index.html @@ -20,9 +20,9 @@ There are a few verbs that can be used in the prompt text. These will be formatted and replaced with the appropriate values. %d - Current working directory %u - Name of current user -%h - Hostname of device

read(prompt) -> input

Read input from the user, using Hilbish’s line editor/input reader. +%h - Hostname of device

read(prompt) -> input (string)

Read input from the user, using Hilbish’s line editor/input reader. This is a separate instance from the one Hilbish actually uses. -Returns input, will be nil if ctrl + d is pressed, or an error occurs (which shouldn’t happen)

run(cmd, returnOut) -> exitCode, stdout, stderr

Runs cmd in Hilbish’s sh interpreter. +Returns input, will be nil if ctrl + d is pressed, or an error occurs (which shouldn’t happen)

run(cmd, returnOut) -> exitCode (number), stdout (string), stderr (string)

Runs cmd in Hilbish’s sh interpreter. If returnOut is true, the outputs of cmd will be returned as the 2nd and 3rd values instead of being outputted to the terminal.

runnerMode(mode)

Sets the execution/runner mode for interactive Hilbish. This determines whether Hilbish wll try to run input as Lua and/or sh or only do one of either. diff --git a/docs/api/hilbish/index.xml b/docs/api/hilbish/index.xml index 6a2c6b8..31d9b10 100644 --- a/docs/api/hilbish/index.xml +++ b/docs/api/hilbish/index.xml @@ -1,8 +1,8 @@ Module hilbish on Hilbishhttps://rosettea.github.io/Hilbish/docs/api/hilbish/Recent content in Module hilbish on HilbishHugo -- gohugo.ioen-usInterface hilbish.aliaseshttps://rosettea.github.io/Hilbish/docs/api/hilbish/hilbish.aliases/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/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() Get a table of all aliases. -resolve(alias) Tries to resolve an alias to its command.Interface hilbish.completionshttps://rosettea.github.io/Hilbish/docs/api/hilbish/hilbish.completions/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/docs/api/hilbish/hilbish.completions/Introduction The completions interface deals with tab completions. +list() -&gt; aliases (table) Get a table of all aliases, with string keys as the alias and the value as the command. @returns table&lt;string, string&gt; +resolve(alias) -&gt; command (string) Tries to resolve an alias to its command.Interface hilbish.completionshttps://rosettea.github.io/Hilbish/docs/api/hilbish/hilbish.completions/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/docs/api/hilbish/hilbish.completions/Introduction The completions interface deals with tab completions. Functions call(name, query, ctx, fields) Calls a completer function. This is mainly used to call a command completer, which will have a name in the form of command.name, example: command.git handler(line, pos) The handler function is the callback for tab completion in Hilbish. You can check the completions doc for more info. bins(query, ctx, fields) Returns binary/executale completion candidates based on the provided query.Interface hilbish.editorhttps://rosettea.github.io/Hilbish/docs/api/hilbish/hilbish.editor/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/docs/api/hilbish/hilbish.editor/Introduction The hilbish.editor interface provides functions to directly interact with the line editor in use. @@ -18,7 +18,5 @@ Jobs are the name of background tasks/commands. A job can be started via interac Object properties cmd: The user entered command string for the job. running: Whether the job is running or not. id: The ID of the job in the job table pid: The Process ID exitCode: The last exit code of the job.Interface hilbish.oshttps://rosettea.github.io/Hilbish/docs/api/hilbish/hilbish.os/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/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 OSInterface hilbish.runnerhttps://rosettea.github.io/Hilbish/docs/api/hilbish/hilbish.runner/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/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, which will be used to execute all interactive input.Interface hilbish.timershttps://rosettea.github.io/Hilbish/docs/api/hilbish/hilbish.timers/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/docs/api/hilbish/hilbish.timers/Introduction The timers interface si one to easily set timeouts and intervals to run functions after a certain time or repeatedly without using odd tricks. -Object properties type: What type of timer it is running: If the timer is running duration: The duration in milliseconds that the timer will run Functions start() Starts a timer. -stop() Stops a timer. -create(type, time, callback) Creates a timer that runs based on the specified time in milliseconds.Interface hilbish.userDirhttps://rosettea.github.io/Hilbish/docs/api/hilbish/hilbish.userdir/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/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&rsquo;s preferred directories for configs and data. +Interface fields INTERVAL: Constant for an interval timer type TIMEOUT: Constant for a timeout timer type Object properties type: What type of timer it is running: If the timer is running duration: The duration in milliseconds that the timer will run Functions start() Starts a timer.Interface hilbish.userDirhttps://rosettea.github.io/Hilbish/docs/api/hilbish/hilbish.userdir/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/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&rsquo;s preferred directories for configs and data. Interface fields config: The user&rsquo;s config directory data: The user&rsquo;s directory for program data \ No newline at end of file diff --git a/index.xml b/index.xml index 07c2f3e..45d2795 100644 --- a/index.xml +++ b/index.xml @@ -6,8 +6,8 @@ You can download both at any time, but note that the development builds may have For the latest stable release, check here: https://github.com/Rosettea/Hilbish/releases/latest For a development build: https://nightly.link/Rosettea/Hilbish/workflows/build/master Package Repositories Fedora (COPR) An official COPR is offered to install Hilbish easily on Fedora.Interface hilbish.aliaseshttps://rosettea.github.io/Hilbish/docs/api/hilbish/hilbish.aliases/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/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() Get a table of all aliases. -resolve(alias) Tries to resolve an alias to its command.Interface hilbish.completionshttps://rosettea.github.io/Hilbish/docs/api/hilbish/hilbish.completions/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/docs/api/hilbish/hilbish.completions/Introduction The completions interface deals with tab completions. +list() -&gt; aliases (table) Get a table of all aliases, with string keys as the alias and the value as the command. @returns table&lt;string, string&gt; +resolve(alias) -&gt; command (string) Tries to resolve an alias to its command.Interface hilbish.completionshttps://rosettea.github.io/Hilbish/docs/api/hilbish/hilbish.completions/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/docs/api/hilbish/hilbish.completions/Introduction The completions interface deals with tab completions. Functions call(name, query, ctx, fields) Calls a completer function. This is mainly used to call a command completer, which will have a name in the form of command.name, example: command.git handler(line, pos) The handler function is the callback for tab completion in Hilbish. You can check the completions doc for more info. bins(query, ctx, fields) Returns binary/executale completion candidates based on the provided query.Interface hilbish.editorhttps://rosettea.github.io/Hilbish/docs/api/hilbish/hilbish.editor/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/docs/api/hilbish/hilbish.editor/Introduction The hilbish.editor interface provides functions to directly interact with the line editor in use. @@ -23,9 +23,7 @@ Jobs are the name of background tasks/commands. A job can be started via interac Object properties cmd: The user entered command string for the job. running: Whether the job is running or not. id: The ID of the job in the job table pid: The Process ID exitCode: The last exit code of the job.Interface hilbish.oshttps://rosettea.github.io/Hilbish/docs/api/hilbish/hilbish.os/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/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 OSInterface hilbish.runnerhttps://rosettea.github.io/Hilbish/docs/api/hilbish/hilbish.runner/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/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, which will be used to execute all interactive input.Interface hilbish.timershttps://rosettea.github.io/Hilbish/docs/api/hilbish/hilbish.timers/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/docs/api/hilbish/hilbish.timers/Introduction The timers interface si one to easily set timeouts and intervals to run functions after a certain time or repeatedly without using odd tricks. -Object properties type: What type of timer it is running: If the timer is running duration: The duration in milliseconds that the timer will run Functions start() Starts a timer. -stop() Stops a timer. -create(type, time, callback) Creates a timer that runs based on the specified time in milliseconds.Interface hilbish.userDirhttps://rosettea.github.io/Hilbish/docs/api/hilbish/hilbish.userdir/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/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&rsquo;s preferred directories for configs and data. +Interface fields INTERVAL: Constant for an interval timer type TIMEOUT: Constant for a timeout timer type Object properties type: What type of timer it is running: If the timer is running duration: The duration in milliseconds that the timer will run Functions start() Starts a timer.Interface hilbish.userDirhttps://rosettea.github.io/Hilbish/docs/api/hilbish/hilbish.userdir/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/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&rsquo;s preferred directories for configs and data. Interface fields config: The user&rsquo;s config directory data: The user&rsquo;s directory for program dataModule baithttps://rosettea.github.io/Hilbish/docs/api/bait/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/docs/api/bait/Introduction Bait is the event emitter for Hilbish. Why name it bait? Why not. It throws hooks that you can catch. This is what you will use if you want to listen in on hooks to know when certain things have happened, like when you&rsquo;ve changed directory, a command has failed, etc. To find all available hooks thrown by Hilbish, see doc hooks. Functions catch(name, cb) Catches a hook with name.Module commanderhttps://rosettea.github.io/Hilbish/docs/api/commander/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/docs/api/commander/Introduction Commander is a library for writing custom commands in Lua. Functions deregister(name) Deregisters any command registered with name