Clarified that exec pushed the return code on the stack.
h3rald h3rald@h3rald.com
Wed, 18 Dec 2024 18:59:37 +0000
2 files changed,
3 insertions(+),
3 deletions(-)
M
src/help.c
→
src/help.c
@@ -120,6 +120,6 @@
// Shell hex_doc(docs, "args", "", "q", "Returns the program arguments."); hex_doc(docs, "exit", "i", "", "Exits the program with exit code 'i'."); - hex_doc(docs, "exec", "s", "", "Executes the command 's'."); + hex_doc(docs, "exec", "s", "i", "Executes the command 's'."); hex_doc(docs, "run", "s", "q", "Executes 's' and returns code, stdout, stderr."); }
M
web/contents/spec.html
→
web/contents/spec.html
@@ -581,8 +581,8 @@ <h5 id="exit-symbol"><code>$:exit$$</code> Symbol<a href="#top"></a></h5>
<p><mark> i →</mark></p> <p>Exits the program with the exit code <code>i</code>.</p> <h5 id="exec-symbol"><code>$:exec$$</code> Symbol<a href="#top"></a></h5> - <p><mark> s →</mark></p> - <p>Executes the string <code>s</code> as a shell command.</p> + <p><mark> s → i</mark></p> + <p>Executes the string <code>s</code> as a shell command, and pushes the command return code on the stack.</p> <h5 id="run-symbol"><code>$:run$$</code> Symbol<a href="#top"></a></h5> <p><mark> s → q</mark></p> <p>Executes the string <code>s</code> as a shell command, capturing its output and errors. It pushes a quotation