2
2
mirror of https://github.com/Hilbis/Hilbish synced 2025-07-01 08:42:04 +00:00

14 lines
5.7 KiB
XML

<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>API on Hilbish</title><link>https://rosettea.github.io/Hilbish/versions/luaify/docs/api/</link><description>Recent content in API on Hilbish</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><atom:link href="https://rosettea.github.io/Hilbish/versions/luaify/docs/api/index.xml" rel="self" type="application/rss+xml"/><item><title>Module bait</title><link>https://rosettea.github.io/Hilbish/versions/luaify/docs/api/bait/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://rosettea.github.io/Hilbish/versions/luaify/docs/api/bait/</guid><description>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 pick a unique name!
Usage of the Bait module consists of userstanding event-driven architecture, but it&amp;rsquo;s pretty simple: If you want to act on a certain event, you can catch it. You can act on events via callback functions.</description></item><item><title>Module commander</title><link>https://rosettea.github.io/Hilbish/versions/luaify/docs/api/commander/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://rosettea.github.io/Hilbish/versions/luaify/docs/api/commander/</guid><description>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 &amp;#39;commander&amp;#39; 2 3commander.register(&amp;#39;hello&amp;#39;, function(args, sinks) 4 sinks.out:writeln &amp;#39;Hello world!&amp;#39; 5end) In this example, a command with the name of hello is created that will print Hello world!</description></item><item><title>Module fs</title><link>https://rosettea.github.io/Hilbish/versions/luaify/docs/api/fs/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://rosettea.github.io/Hilbish/versions/luaify/docs/api/fs/</guid><description>Introduction The fs module provides filesystem functions to Hilbish. While Lua&amp;rsquo;s standard library has some I/O functions, they&amp;rsquo;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) -&amp;gt; string Returns an absolute version of the path. basename(path) -&amp;gt; string Returns the &amp;ldquo;basename,&amp;rdquo; or the last part of the provided path. If path is empty, cd(dir) Changes Hilbish&amp;rsquo;s directory to dir.</description></item><item><title>Module readline</title><link>https://rosettea.github.io/Hilbish/versions/luaify/docs/api/readline/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://rosettea.github.io/Hilbish/versions/luaify/docs/api/readline/</guid><description>Introduction 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.
Functions new() -&amp;gt; @Readline Creates a new readline instance. readline.new() -> Readline Creates a new readline instance.
Parameters This function has no parameters.</description></item><item><title>Module snail</title><link>https://rosettea.github.io/Hilbish/versions/luaify/docs/api/snail/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://rosettea.github.io/Hilbish/versions/luaify/docs/api/snail/</guid><description>Introduction The snail library houses Hilbish&amp;rsquo;s Lua wrapper of its shell script interpreter. It&amp;rsquo;s not very useful other than running shell scripts, which can be done with other Hilbish functions.
Functions new() -&amp;gt; @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.
Methods dir(path) Changes the directory of the snail instance.</description></item><item><title>Module terminal</title><link>https://rosettea.github.io/Hilbish/versions/luaify/docs/api/terminal/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://rosettea.github.io/Hilbish/versions/luaify/docs/api/terminal/</guid><description>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 This function has no parameters.</description></item><item><title>Module yarn</title><link>https://rosettea.github.io/Hilbish/versions/luaify/docs/api/yarn/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://rosettea.github.io/Hilbish/versions/luaify/docs/api/yarn/</guid><description>Introduction Yarn is a simple multithreading library. Threads are individual Lua states, so they do NOT share the same environment as the code that runs the thread. Bait and Commanders are shared though, so you can throw hooks from 1 thread to another.
Example:
1local yarn = require &amp;#39;yarn&amp;#39; 2 3-- calling t will run the yarn thread. 4local t = yarn.thread(print) 5t &amp;#39;printing from another lua state!&amp;#39; Functions thread(fun) -&amp;gt; @Thread Creates a new, fresh Yarn thread.</description></item></channel></rss>