docs(hilbish.run): detail streams parameter

pull/291/head
sammyette 2024-04-27 20:31:17 -04:00
parent 75c3b95517
commit 7464702052
Signed by: sammyette
GPG Key ID: 904FC49417B44DCD
1 changed files with 6 additions and 1 deletions

7
api.go
View File

@ -186,7 +186,12 @@ func handleStream(v rt.Value, strms *streams, errStream bool) error {
// run(cmd, streams) -> exitCode (number), stdout (string), stderr (string) // run(cmd, streams) -> exitCode (number), stdout (string), stderr (string)
// Runs `cmd` in Hilbish's shell script interpreter. // Runs `cmd` in Hilbish's shell script interpreter.
// #param cmd string // #param cmd string
// #param returnOut boolean If this is true, the function will return the standard output and error of the command instead of printing it. // #param streams table|boolean
// Specifies the output and input streams the command should use.
// For example, to write command output to a sink.
// As a table, the caller can directly specify the standard output, error, and input
// streams of the command with the table keys `out`, `err`, and `input` respectively.
// As a boolean, it specifies whether the command should use standard output or return its output streams.
// #returns number, string, string // #returns number, string, string
func hlrun(t *rt.Thread, c *rt.GoCont) (rt.Cont, error) { func hlrun(t *rt.Thread, c *rt.GoCont) (rt.Cont, error) {
// TODO: ON BREAKING RELEASE, DO NOT ACCEPT `streams` AS A BOOLEAN. // TODO: ON BREAKING RELEASE, DO NOT ACCEPT `streams` AS A BOOLEAN.