Scoop API

scoop:scoop.terminal:0.1.0

TerminalSession

class TerminalSession

source · line 59
public
public class TerminalSession private constructor(escapeDelay: Duration) : ByteSink, Closeable

An owned synchronous terminal session with input parsing, queries, byte output, and raw-mode restoration. Operations on one session must not overlap.

Extensions

function enableRawMode

source · line 124
public
public fun enableRawMode(): Unit

Enables raw input mode, retaining the state needed for restoration.

function disableRawMode

source · line 130
public
public fun disableRawMode(): Unit

Restores the mode saved before raw input was enabled.

function close

source · line 171
public
public override fun close(): Unit

Restores terminal state and closes the owned handle; close cannot overlap another session operation.

function read

source · line 136
public
public fun read(): Event

Waits for the next user-facing event, preserving query replies for query processing.

function flush

source · line 163
public
public override fun flush(): Unit

Checks the unbuffered terminal session state; queued library commands are written immediately.