TerminalControl

interface TerminalControl

Lets other programs use the terminal for a while, like an editor or an interactive command.

Properties

Link copied to clipboard

Whether suspendProcess is supported. It needs job control, which Windows does not have, and the terminal the process was started in.

Functions

Link copied to clipboard
abstract suspend fun <T> released(block: suspend () -> T): T

Gives the terminal back while block runs, as it was before Mosaic started, and then takes it over again and draws everything anew.

Link copied to clipboard
abstract suspend fun suspendProcess(): Boolean

Stops the process like Ctrl+Z normally does in a shell, with the terminal released, and returns once the shell continues it, like with fg. Returns false right away when canSuspendProcess is false.