This is mainly due to the fact that the default method Hilbish uses
is that it runs Lua first and then falls back to shell script.</p><p>In some cases, someone might want to switch to just shell script to avoid
it while interactive but still have a Lua config, or go full Lua to use
Hilbish as a REPL. This also allows users to add alternative languages like
Fennel as the interactive script runner.</p><p>Runner mode can also be used to handle specific kinds of input before
evaluating like normal, which is how <ahref=https://github.com/TorchedSammy/Link.hshtarget=_blankrel=noopener>Link.hsh</a>
handles links.</p><p>The “runner mode” of Hilbish is customizable via <code>hilbish.runnerMode</code>,
which determines how Hilbish will run user input. By default, this is
set to <code>hybrid</code> which is the previously mentioned behaviour of running Lua
first then going to shell script. If you want the reverse order, you can
set it to <code>hybridRev</code> and for isolated modes there is <code>sh</code> and <code>lua</code>
respectively.</p><p>You can also set it to a function, which will be called everytime Hilbish
needs to run interactive input. For more detail, see the <ahref=../../api/hilbish/hilbish.runner>API documentation</a></p><p>The <code>hilbish.runner</code> interface is an alternative to using <code>hilbish.runnerMode</code>
and also provides the shell script and Lua runner functions that Hilbish itself uses.</p><p>A runner function is expected to return a table with the following values:</p><ul><li><code>exitCode</code> (number): Exit code of the command</li><li><code>input</code> (string): The text input of the user. This is used by Hilbish to append extra input, in case
more is requested.</li><li><code>err</code> (string): A string that represents an error from the runner.
This should only be set when, for example, there is a syntax error.
It can be set to a few special values for Hilbish to throw the right
hooks and have a better looking message.<ul><li><code><command>: not-found</code> will throw a <code>command.not-found</code> hook
based on what <code><command></code> is.</li><li><code><command>: not-executable</code> will throw a <code>command.not-executable</code> hook.</li></ul></li><li><code>continue</code> (boolean): Whether Hilbish should prompt the user for no input</li></ul><h3id=functionsclass=heading>Functions
<ahref=#functionsclass=heading-link><iclass="fas fa-paperclip"></i></a></h3><p>These are the “low level” functions for the <code>hilbish.runner</code> interface.</p><ul><li>setMode(mode) > The same as <code>hilbish.runnerMode</code></li><li>sh(input) -> table > Runs <code>input</code> in Hilbish’s sh interpreter</li><li>lua(input) -> table > Evals <code>input</code> as Lua code</li></ul><p>These functions should be preferred over the previous ones.</p><ul><li>setCurrent(mode) > The same as <code>setMode</code>, but works with runners managed
via the functions below.</li><li>add(name, runner) > Adds a runner to a table of available runners. The <code>runner</code>
argument is either a function or a table with a run callback.</li><li>set(name, runner) > The same as <code>add</code> but requires passing a table and
overwrites if the <code>name</code>d runner already exists.</li><li>get(name) > runner > Gets a runner by name. It is a table with at least a
run function, to run input.</li><li>exec(cmd, runnerName) > Runs <code>cmd</code> with a runner. If <code>runnerName</code> isn’t passed,