gh-pages
TorchedSammy 2023-07-11 02:46:23 +00:00
parent 67bc6a526a
commit a1615d0d8c
3 changed files with 9 additions and 9 deletions

View File

@ -7,12 +7,10 @@ to load Hilbish plugins/modules.
Hilbish modules are Go-written plugins (see <a href=https://pkg.go.dev/plugin target=_blank rel=noopener>https://pkg.go.dev/plugin</a>
)
that are used to add functionality to Hilbish that cannot be written
n Lua for any reason.</p><p>To make a valid native module, the Go plugin
in Lua for any reason.</p><p>To make a valid native module, the Go plugin
has to export a Loader function with a signature like so:
<code>func(*rt.Runtime) rt.Value</code>
<code>rt</code> in this case refers to the Runtime type at
<a href=https://pkg.go.dev/github.com/arnodel/golua@master/runtime#Runtime target=_blank rel=noopener>https://pkg.go.dev/github.com/arnodel/golua@master/runtime#Runtime</a>
Hilbish uses this package as its Lua runtime. You will need to read
<code>func(*rt.Runtime) rt.Value</code>.</p><p><code>rt</code> in this case refers to the Runtime type at
<a href=https://pkg.go.dev/github.com/arnodel/golua@master/runtime#Runtime target=_blank rel=noopener>https://pkg.go.dev/github.com/arnodel/golua@master/runtime#Runtime</a></p><p>Hilbish uses this package as its Lua runtime. You will need to read
it to use it for a native plugin.</p><h3 id=functions class=heading>Functions
<a href=#functions class=heading-link><i class="fas fa-paperclip"></i></a></h3><h4 id=loadpath class=heading>load(path)
<a href=#loadpath class=heading-link><i class="fas fa-paperclip"></i></a></h4><p>Loads a module at the designated <code>path</code>.

View File

@ -17,8 +17,9 @@ size() -&amp;gt; number Returns the amount of commands in the history.</descript
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() -&amp;gt; table&amp;lt;Job&amp;gt; Returns a table of all job objects.
disown(id) Disowns a job. This deletes it from the job table.</description></item><item><title>Interface hilbish.module</title><link>https://rosettea.github.io/Hilbish/versions/native-modules/docs/api/hilbish/hilbish.module/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://rosettea.github.io/Hilbish/versions/native-modules/docs/api/hilbish/hilbish.module/</guid><description>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 n Lua for any reason.
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.</description></item><item><title>Interface hilbish.os</title><link>https://rosettea.github.io/Hilbish/versions/native-modules/docs/api/hilbish/hilbish.os/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://rosettea.github.io/Hilbish/versions/native-modules/docs/api/hilbish/hilbish.os/</guid><description> Introduction The os interface provides simple text information properties about the current OS on the systen. This mainly includes the name and version.
disown(id) Disowns a job. This deletes it from the job table.</description></item><item><title>Interface hilbish.module</title><link>https://rosettea.github.io/Hilbish/versions/native-modules/docs/api/hilbish/hilbish.module/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://rosettea.github.io/Hilbish/versions/native-modules/docs/api/hilbish/hilbish.module/</guid><description>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.
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.</description></item><item><title>Interface hilbish.os</title><link>https://rosettea.github.io/Hilbish/versions/native-modules/docs/api/hilbish/hilbish.os/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://rosettea.github.io/Hilbish/versions/native-modules/docs/api/hilbish/hilbish.os/</guid><description> Introduction The os interface provides simple text information properties about the current OS on the systen. This mainly includes the name and version.
Interface fields family: Family name of the current OS name: Pretty name of the current OS version: Version of the current OS</description></item><item><title>Interface hilbish.runner</title><link>https://rosettea.github.io/Hilbish/versions/native-modules/docs/api/hilbish/hilbish.runner/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://rosettea.github.io/Hilbish/versions/native-modules/docs/api/hilbish/hilbish.runner/</guid><description>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.</description></item><item><title>Interface hilbish.timers</title><link>https://rosettea.github.io/Hilbish/versions/native-modules/docs/api/hilbish/hilbish.timers/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://rosettea.github.io/Hilbish/versions/native-modules/docs/api/hilbish/hilbish.timers/</guid><description>Introduction If you ever want to run a piece of code on a timed interval, or want to wait a few seconds, you don&amp;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.</description></item><item><title>Interface hilbish.userDir</title><link>https://rosettea.github.io/Hilbish/versions/native-modules/docs/api/hilbish/hilbish.userdir/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://rosettea.github.io/Hilbish/versions/native-modules/docs/api/hilbish/hilbish.userdir/</guid><description> Introduction This interface just contains properties to know about certain user directories. It is equivalent to XDG on Linux and gets the user&amp;rsquo;s preferred directories for configs and data.

View File

@ -33,8 +33,9 @@ size() -&amp;gt; number Returns the amount of commands in the history.</descript
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() -&amp;gt; table&amp;lt;Job&amp;gt; Returns a table of all job objects.
disown(id) Disowns a job. This deletes it from the job table.</description></item><item><title>Interface hilbish.module</title><link>https://rosettea.github.io/Hilbish/versions/native-modules/docs/api/hilbish/hilbish.module/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://rosettea.github.io/Hilbish/versions/native-modules/docs/api/hilbish/hilbish.module/</guid><description>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 n Lua for any reason.
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.</description></item><item><title>Interface hilbish.os</title><link>https://rosettea.github.io/Hilbish/versions/native-modules/docs/api/hilbish/hilbish.os/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://rosettea.github.io/Hilbish/versions/native-modules/docs/api/hilbish/hilbish.os/</guid><description> Introduction The os interface provides simple text information properties about the current OS on the systen. This mainly includes the name and version.
disown(id) Disowns a job. This deletes it from the job table.</description></item><item><title>Interface hilbish.module</title><link>https://rosettea.github.io/Hilbish/versions/native-modules/docs/api/hilbish/hilbish.module/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://rosettea.github.io/Hilbish/versions/native-modules/docs/api/hilbish/hilbish.module/</guid><description>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.
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.</description></item><item><title>Interface hilbish.os</title><link>https://rosettea.github.io/Hilbish/versions/native-modules/docs/api/hilbish/hilbish.os/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://rosettea.github.io/Hilbish/versions/native-modules/docs/api/hilbish/hilbish.os/</guid><description> Introduction The os interface provides simple text information properties about the current OS on the systen. This mainly includes the name and version.
Interface fields family: Family name of the current OS name: Pretty name of the current OS version: Version of the current OS</description></item><item><title>Interface hilbish.runner</title><link>https://rosettea.github.io/Hilbish/versions/native-modules/docs/api/hilbish/hilbish.runner/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://rosettea.github.io/Hilbish/versions/native-modules/docs/api/hilbish/hilbish.runner/</guid><description>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.</description></item><item><title>Interface hilbish.timers</title><link>https://rosettea.github.io/Hilbish/versions/native-modules/docs/api/hilbish/hilbish.timers/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://rosettea.github.io/Hilbish/versions/native-modules/docs/api/hilbish/hilbish.timers/</guid><description>Introduction If you ever want to run a piece of code on a timed interval, or want to wait a few seconds, you don&amp;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.</description></item><item><title>Interface hilbish.userDir</title><link>https://rosettea.github.io/Hilbish/versions/native-modules/docs/api/hilbish/hilbish.userdir/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://rosettea.github.io/Hilbish/versions/native-modules/docs/api/hilbish/hilbish.userdir/</guid><description> Introduction This interface just contains properties to know about certain user directories. It is equivalent to XDG on Linux and gets the user&amp;rsquo;s preferred directories for configs and data.