PlainTerminal

class PlainTerminal(useStdErr: Boolean = false) : Terminal(source)

Terminal implementation that outputs plain text without any formatting.

This terminal ignores all styling requests and outputs all text as plain text. Useful for environments that don't support ANSI colors or when plain output is desired.

Parameters

useStdErr

Whether to output to standard error instead of standard output

Constructors

Link copied to clipboard
constructor(useStdErr: Boolean = false)

Properties

Link copied to clipboard
open val infoColumn: Int

Column position for aligning help text descriptions.

Link copied to clipboard
open val width: Int

The terminal width in characters for text wrapping. Defaults to system terminal width.

Functions

Link copied to clipboard
open fun emitError(text: String)

Emits text formatted as an error message.

Link copied to clipboard
open fun emitNewLine()

Emits a platform-appropriate newline sequence.

Link copied to clipboard
open fun emitParam(text: String)

Emits text formatted as a parameter (e.g., option names, values).

Link copied to clipboard
open override fun emitPlain(text: String)

Emits plain text without any formatting.

Link copied to clipboard
open fun emitStrong(text: String)

Emits text with strong/bold formatting. Default implementation outputs as plain text.

Link copied to clipboard
open fun endEmit()

Called after completing a sequence of text emissions. Override for cleanup operations.

Link copied to clipboard
open fun startEmit()

Called before starting a sequence of text emissions. Override for setup operations.