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 ec4edeb..24f7235 100644 --- a/versions/doc-improvements/docs/api/hilbish/hilbish.jobs/index.html +++ b/versions/doc-improvements/docs/api/hilbish/hilbish.jobs/index.html @@ -5,7 +5,7 @@

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.
get(id) -> @JobGet a job object via its ID.
last() -> @JobReturns the last added job from the table.

Functions -






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


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

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

Parameters

This function has no parameters.


hilbish.jobs.all() -> table\<Job>

Returns a table of all job objects.

Parameters @@ -16,9 +16,9 @@ interactive usage or with the functions defined below for use in external runner

This function has no parameters.


hilbish.jobs.last() -> Job

Returns the last added job from the table.

Parameters

This function has no parameters.

Types -

Job -

The Job type describes a Hilbish job.

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.

Methods +


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 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 e2c5405..14043f2 100644 --- a/versions/doc-improvements/docs/api/hilbish/hilbish.os/index.html +++ b/versions/doc-improvements/docs/api/hilbish/hilbish.os/index.html @@ -4,5 +4,5 @@

Module hilbish.os

OS Info

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 -

familyFamily name of the current OS
namePretty name of the current OS
versionVersion of the current OS
\ No newline at end of file +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.timers/index.html b/versions/doc-improvements/docs/api/hilbish/hilbish.timers/index.html index a1dce6f..e9a6e79 100644 --- a/versions/doc-improvements/docs/api/hilbish/hilbish.timers/index.html +++ b/versions/doc-improvements/docs/api/hilbish/hilbish.timers/index.html @@ -14,17 +14,17 @@ end) t:start() print(t.running) // true

Functions -

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

Interface fields -

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

Functions -




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

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

Static module fields +

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

Functions +


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

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

Parameters

This function has no parameters.


hilbish.timers.get(id) -> Timer

Retrieves a timer via its ID.

Parameters

This function has no parameters.

Types -

Timer -

The Job type describes a Hilbish timer.

Properties -

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

Methods +


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/doc-improvements/docs/api/hilbish/hilbish.userdir/index.html b/versions/doc-improvements/docs/api/hilbish/hilbish.userdir/index.html index 549333e..ef60ce6 100644 --- a/versions/doc-improvements/docs/api/hilbish/hilbish.userdir/index.html +++ b/versions/doc-improvements/docs/api/hilbish/hilbish.userdir/index.html @@ -4,5 +4,5 @@

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.

Interface fields -

configThe user’s config directory
dataThe user’s directory for program data
\ No newline at end of file +for configs and data.

Static module fields +

configThe user’s config directory
dataThe user’s directory for program data
\ No newline at end of file diff --git a/versions/doc-improvements/docs/api/hilbish/index.html b/versions/doc-improvements/docs/api/hilbish/index.html index 22d53a2..c7112da 100644 --- a/versions/doc-improvements/docs/api/hilbish/index.html +++ b/versions/doc-improvements/docs/api/hilbish/index.html @@ -4,8 +4,8 @@

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 of cmd to orig
appendPath(dir)Appends dir to $PATH
complete(scope, cb)Registers a completion handler for scope.
cwd() -> stringReturns the current directory of the shell
exec(cmd)Replaces running hilbish with cmd
goro(fn)Puts fn in a goroutine
highlighter(line)Line highlighter handler. This is mainly for syntax highlighting, but in
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 continued line prompt to str
prependPath(dir)Prepends dir to $PATH
prompt(str, typ)Changes the shell prompt to str
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 sh 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.

Interface fields -

verThe version of Hilbish
goVersionThe version of Go that Hilbish was compiled with
userUsername of the user
hostHostname of the machine
dataDirDirectory for Hilbish data files, including the docs and default modules
interactiveIs Hilbish in an interactive shell?
loginIs Hilbish the login shell?
vimModeCurrent Vim input mode of Hilbish (will be nil if not in Vim input mode)
exitCodexit code of the last executed command

Functions +

alias(cmd, orig)Sets an alias of cmd to orig
appendPath(dir)Appends dir to $PATH
complete(scope, cb)Registers a completion handler for scope.
cwd() -> stringReturns the current directory of the shell
exec(cmd)Replaces running hilbish with cmd
goro(fn)Puts fn in a goroutine
highlighter(line)Line highlighter handler. This is mainly for syntax highlighting, but in
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 continued line prompt to str
prependPath(dir)Prepends dir to $PATH
prompt(str, typ)Changes the shell prompt to str
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 sh 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 +

verThe version of Hilbish
goVersionThe version of Go that Hilbish was compiled with
userUsername of the user
hostHostname of the machine
dataDirDirectory for Hilbish data files, including the docs and default modules
interactiveIs Hilbish in an interactive shell?
loginIs Hilbish the login shell?
vimModeCurrent Vim input mode of Hilbish (will be nil if not in Vim input mode)
exitCodexit code of the last executed command

Functions


hilbish.alias(cmd, orig)

Sets an alias of cmd to orig

Parameters

This function has no parameters.


hilbish.appendPath(dir) @@ -74,10 +74,10 @@ This creates a timer that starts immediately.

This function has no parameters.


hilbish.which(name) -> string

Checks if name is a valid command. Will return the path of the binary, or a basename if it’s a commander.

Parameters -

This function has no parameters.






## Types -## Sink -A sink is a structure that has input and/or output to/from -a desination.

Methods +

This function has no parameters.

Types +


Sink +

A sink is a structure that has input and/or output to/from +a desination.

Methods

autoFlush(auto)

Sets/toggles the option of automatically flushing output. A call with no argument will toggle the value.

flush() diff --git a/versions/doc-improvements/docs/api/hilbish/index.xml b/versions/doc-improvements/docs/api/hilbish/index.xml index e6461e6..1d9ccfd 100644 --- a/versions/doc-improvements/docs/api/hilbish/index.xml +++ b/versions/doc-improvements/docs/api/hilbish/index.xml @@ -6,7 +6,7 @@ Parameters This function has no parameters.Mod Functions add(cmd) Adds a command to the history. all() -&gt; table Retrieves all history. clear() Deletes all commands from the history. get(idx) Retrieves a command from the history based on the idx. size() -&gt; number Returns the amount of commands in the history. Functions hilbish.history.add(cmd) Adds a command to the history.</description></item><item><title>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() -&gt; table&lt;@Job&gt; 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 OSModule 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. +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/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&rsquo;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&rsquo;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&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 +Static module 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/versions/doc-improvements/index.xml b/versions/doc-improvements/index.xml index fcfc400..096d0bc 100644 --- a/versions/doc-improvements/index.xml +++ b/versions/doc-improvements/index.xml @@ -25,10 +25,10 @@ Parameters This function has no parameters.Mod Functions add(cmd) Adds a command to the history. all() -&gt; table Retrieves all history. clear() Deletes all commands from the history. get(idx) Retrieves a command from the history based on the idx. size() -&gt; number Returns the amount of commands in the history. Functions hilbish.history.add(cmd) Adds a command to the history.</description></item><item><title>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() -&gt; table&lt;@Job&gt; 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 OSModule 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. +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/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&rsquo;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&rsquo;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&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 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. +Static module fields config The user&rsquo;s config directory data The user&rsquo;s directory for program dataModule 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: