Unreleased APIs from PR #2. Not in 0.2.1. Stable 0.2.1 reference.
LOOM Unreleased (PR #2) / SUPPORTING WEFT TYPES
TerminalCommand
Lower-level terminal commands supplied by weft. Add the weft product and import weft to refer to this type by name. ANSI byte generation does not open a session or write the bytes itself.
Defined by weft, with no loom typealias. Add the weft product to your target and use import weft when referring to this type by name.
Standard inherited Swift protocol operations such as synthesized equality and OptionSet set operations are not repeated. The public declarations below are extracted from the exact source revision listed in the coverage manifest.
Example
let command = TerminalCommand.moveCursor(Point(x: 0, y: 0))
_ = command.escapeSequenceMembers on this page
Feature guides and release status
TerminalCommand
enum TerminalCommandConforms to: Swift.Equatable, Swift.Sendable, Swift.SendableMetatype.
Terminal controls usable without a renderer.
Coordinates are zero-based cells.
Source · TerminalCommand.swift:6moveCursor(_:)
case moveCursor(Point)The move cursor case. Associated values, if any, are shown in the declaration.
Source · TerminalCommand.swift:7clearScreen
case clearScreenClears the display and moves the cursor home; does not clear scrollback.
Source · TerminalCommand.swift:8clearLine
case clearLineClears the entire current terminal line.
Source · TerminalCommand.swift:9cursorVisible(_:)
case cursorVisible(Bool)The cursor visible case. Associated values, if any, are shown in the declaration.
Source · TerminalCommand.swift:10resetStyle
case resetStyleResets terminal text styling to conventional defaults.
Source · TerminalCommand.swift:11escapeSequence
var escapeSequence: String { get }Returns ANSI control bytes as a String. Cursor coordinates are translated from zero-based cells to ANSI’s one-based coordinates.
Source · TerminalCommand.swift:13