Scroll::Terminal
Queries the size of the terminal attached to a file descriptor via TIOCGWINSZ, falling back to the LINES/COLUMNS environment variables and then to a conventional 24x80.
Constants
Terminals known to show OSC 9;4 progress. XTVERSION answers with the name, e.g. "\eP>|ghostty 1.2.0\e\".
Class methods
Whether response names a terminal that drives its own progress
indicator. Anything else — no answer, or a terminal that is not on the
list — means the sequence is not worth sending.
Returns {rows, columns} for the terminal on fd. The display lives on
STDERR, so that is the stream whose size matters — never STDOUT, which is
usually redirected in a pipeline.
Ask the controlling terminal to name itself, returning its answer or nil
when it does not answer within timeout — which is the usual case, since
a terminal that does not know the query stays silent.
The query goes to /dev/tty rather than STDIN, which belongs to the stream being copied, and is skipped outside the foreground process group: reading the terminal from the background raises SIGTTIN, which would stop the run.