Skip to content

Stderr

The process's standard error.

Obtained as shell.stderr.

Stateless and interchangeable, as Stdout is. Unlike term.console, this bypasses extensions that have taken over the terminal shell-wide: it is the error stream itself.

Functions that accept an Io write to it as they do to Stdout.

Inherits from: io.Io

Fields

writable @ Bool [get]

Whether the stream writes, which it always does.

Methods

(eq) other -> Bool

Compares two handles. All instances are interchangeable, so any two are equal.

Parameters

NameTypeDescription
other Value

(sink)() -> Stderr

Accepts values as a sink, writing them verbatim, as Stdout does.

close()

Flushes, as flush does. The process's error stream stays open.

flush()

Flushes buffered output to the stream.

write *data -> Int

Writes bytes verbatim, given in pieces. Identical in behavior to Stdout.write.

Parameters

NameTypeDescription
*data (Str | Bin) Bytes to write.

Returns

The number of bytes written.

Example

shell.stderr.write "fatal: no such target\n"