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'
+that works with Hilbish for writing commands. Example:local commander = require 'commander'
-commander.register('hello', function(args, sinks)
- sinks.out:writeln 'Hello world!'
-end)
+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!
to output. One question you may
have is: What is the sinks
parameter?
The sinks
parameter is a table with 3 keys: in
, out
,
diff --git a/versions/doc-improvements/docs/api/fs/index.html b/versions/doc-improvements/docs/api/fs/index.html
index 00ad37e..46c805d 100644
--- a/versions/doc-improvements/docs/api/fs/index.html
+++ b/versions/doc-improvements/docs/api/fs/index.html
@@ -1,5 +1,5 @@
Module fs — Hilbish
-