Subj : RE: Reliable way to get term size To : echicken From : NuSkooler Date : Wed Apr 07 2021 05:03 pm On Tuesday, April 6th echicken muttered... Ec> All of this because "cursor home" is a thing but "cursor end" is not. :| FWIW there is also an unofficial ESC that at least some terminals support (e.g. SyncTERM) to report the size directly: ESC[255n ENiG will try that one as a fallback to NAWS before the 999,999 trick. From cterm.txt: 255 - NON-STANDARD EXTENSION (BCDSR) Replies as though a CSI 6 n was received with the cursor in the bottom right corner. i.e.: Returns the terminal size as a position report. -- |08 ■ |12NuSkooler |06// |12Xibalba |08- |07"|06The place of fear|07" |08 ■ |03xibalba|08.|03l33t|08.|03codes |08(|0344510|08/|03telnet|08, |0344511|08/|03ssh|08) |08 ■ |03ENiGMA 1/2 WHQ |08| |03Phenom |08| |0367 |08| |03iMPURE |08| |03ACiDic --- ENiGMA 1/2 v0.0.12-beta (linux; x64; 14.15.4) * Origin: Xibalba -+- xibalba.l33t.codes:44510 (21:1/121) .