This is utility function that calculates the state of a VT-5xx screen after a certain set of output.
vt_output(output, width = 80L, height = 25L)
Character vector or raw vector. Character vectors are
collapsed (without a separater), and converted to a raw vector using
base::charToRaw()
.
Terminal width.
Terminal height.
Data frame with columns lineno
, segmentno
, segment
,
attributes
.
Currently it supports:
configurable terminal width and height
ASCII printable characters.
\n
, \r
.
ANSI SGR colors, 8 color mode, 256 color mode and true color mode.
Other ANSI SGR features: bold, italic, underline, strikethrough, blink, inverse.
It does not currently supports other features, mode notably:
Other ANSI control sequences and features. Other control sequences are silently ignored.
Wide Unicode characters. Their width is not taken into account correctly.
Unicode graphemes.
This function is experimental, and the virtual temrinal API will likely change in future versions of cli.