Skip to content

Commit 7edfd50

Browse files
committed
deploy: 99ce6d7
1 parent 42a4d79 commit 7edfd50

File tree

1 file changed

+1
-6
lines changed
  • versions/multiline-newline-fix/docs/features/runner-mode

1 file changed

+1
-6
lines changed

versions/multiline-newline-fix/docs/features/runner-mode/index.html

+1-6
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,7 @@
1515
set it to <code>hybridRev</code> and for isolated modes there is <code>sh</code> and <code>lua</code>
1616
respectively.</p><p>You can also set it to a function, which will be called everytime Hilbish
1717
needs to run interactive input. For more detail, see the <a href=../../api/hilbish/hilbish.runner>API documentation</a></p><p>The <code>hilbish.runner</code> interface is an alternative to using <code>hilbish.runnerMode</code>
18-
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
19-
more is requested.</li><li><code>err</code> (string): A string that represents an error from the runner.
20-
This should only be set when, for example, there is a syntax error.
21-
It can be set to a few special values for Hilbish to throw the right
22-
hooks and have a better looking message.<ul><li><code>&lt;command>: not-found</code> will throw a <code>command.not-found</code> hook
23-
based on what <code>&lt;command></code> is.</li><li><code>&lt;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><h3 id=functions class=heading>Functions
18+
and also provides the shell script and Lua runner functions that Hilbish itself uses.</p><h3 id=functions class=heading>Functions
2419
<a href=#functions class=heading-link><i class="fas fa-paperclip"></i></a></h3><p>These are the &ldquo;low level&rdquo; 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&rsquo;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
2520
via the functions below.</li><li>add(name, runner) > Adds a runner to a table of available runners. The <code>runner</code>
2621
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

0 commit comments

Comments
 (0)