The raw string that the user typed. This will include the text without changes applied to it (argument substitution, alias expansion, etc.)
string cmdStr
The command that will be directly executed by the current runner.
command.exit Thrown after the user’s ran command is finished.
Variables number code
The exit code of what was executed.
string cmdStr
The command or code that was executed" property="og:description"><metacontent="command.preexecThrownrightbeforeacommandisexecuted.
Variables string input
The raw string that the user typed. This will include the text without changes applied to it (argument substitution, alias expansion, etc.)
string cmdStr
The command that will be directly executed by the current runner.
command.exit Thrown after the user’s ran command is finished.
Variables number code
The exit code of what was executed.
string cmdStr
The command or code that was executed" name=description><metaname=revisit-aftercontent="2 days"><metaname=keywordscontent="Lua,Hilbish,Linux,Shell"><metaproperty="og:locale"content="en_GB"><linkrel=canonicalhref=https://rosettea.github.io/Hilbish/><metaproperty="og:url"content="https://rosettea.github.io/Hilbish/"><linkhref=https://cdn.jsdelivr.net/npm/bootstrap@5.2.0-beta1/dist/css/bootstrap.min.cssrel=stylesheetintegrity=sha384-0evHe/X+R7YkIZDRvuzKMRqM+OrBnVFBL6DOitfPri4tjfHxaWutUpFmBp4vmVorcrossorigin=anonymous><scriptsrc=https://cdn.jsdelivr.net/npm/bootstrap@5.2.0-beta1/dist/js/bootstrap.bundle.min.jsintegrity=sha384-pprn3073KE6tl6bjs2QrFaJGz5/SUsLqktiwsUTF55Jfv3qYSDhgCecCxMW52nD2crossorigin=anonymous></script>
<ahref=#commandpreexecclass=heading-link><iclass="fas fa-paperclip"></i></a></h3><p>Thrown right before a command is executed.</p><h5id=variablesclass=heading>Variables
<ahref=#variablesclass=heading-link><iclass="fas fa-paperclip"></i></a></h5><p><code>string</code><strong><code>input</code></strong><br>The raw string that the user typed. This will include the text
without changes applied to it (argument substitution, alias expansion,
etc.)</p><p><code>string</code><strong><code>cmdStr</code></strong><br>The command that will be directly executed by the current runner.</p><hr><h3id=commandexitclass=heading>command.exit
<ahref=#commandexitclass=heading-link><iclass="fas fa-paperclip"></i></a></h3><p>Thrown after the user’s ran command is finished.</p><h5id=variables-1class=heading>Variables
<ahref=#variables-1class=heading-link><iclass="fas fa-paperclip"></i></a></h5><p><code>number</code><strong><code>code</code></strong><br>The exit code of what was executed.</p><p><code>string</code><strong><code>cmdStr</code></strong><br>The command or code that was executed</p><hr><h3id=commandnot-foundclass=heading>command.not-found
<ahref=#commandnot-foundclass=heading-link><iclass="fas fa-paperclip"></i></a></h3><p>Thrown if the command attempted to execute was not found.
This can be used to customize the text printed when a command is not found.
</span></span><spanclass=line><spanclass=ln>11</span><spanclass=cl><spanclass=n>print</span><spanclass=p>(</span><spanclass=n>string.format</span><spanclass=p>(</span><spanclass=s1>'The command "%s" was not found.'</span><spanclass=p>,</span><spanclass=n>cmd</span><spanclass=p>))</span>
<ahref=#variables-2class=heading-link><iclass="fas fa-paperclip"></i></a></h5><p><code>string</code><strong><code>cmdStr</code></strong><br>The name of the command.</p><hr><h3id=commandnot-executableclass=heading>command.not-executable
<ahref=#commandnot-executableclass=heading-link><iclass="fas fa-paperclip"></i></a></h3><p>Thrown when the user attempts to run a file that is not executable
(like a text file, or Unix binary without +x permission).</p><h5id=variables-3class=heading>Variables