API on Hilbishhttps://rosettea.github.io/Hilbish/docs/api/Recent content in API on HilbishHugo -- gohugo.ioen-usModule 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’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. In order to make it easier to write commands for Hilbish, not require separate scripts and to be able to use in a config, the Commander library exists. This is like a very simple wrapper that works with Hilbish for writing commands. Example: local commander = require 'commander' commander.register('hello', function(args, sinks) sinks.out:writeln 'Hello world!' end) In this example, a command with the name of hello is created that will print Hello world!Module fshttps://rosettea.github.io/Hilbish/docs/api/fs/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/docs/api/fs/Introduction The fs module provides easy and simple access to filesystem functions and other things, and acts an addition to the Lua standard library’s I/O and filesystem functions. Functions abs(path) Gives an absolute version of path. basename(path) Gives the basename of path. For the rules, see Go’s filepath.Base cd(dir) Changes directory to dir dir(path) Returns the directory part of path. For the rules, see Go’s filepath.Dir glob(pattern) Glob all files and directories that match the pattern.Module terminalhttps://rosettea.github.io/Hilbish/docs/api/terminal/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/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 Note: this is not the size in relation to the dimensions of the display