On Mon, Jan 09, 2023 at 01:52:03PM +0000, Nicholas Marriott wrote: > > From a quick look it will happily fall back to carriage return and space > if the capabilities it would prefer (el and hpa/RI) are not present, so > probably anything would do. > > Or you could check if the terminfo entry existed with something like > "tput el >/dev/null 2>&1" before running pkg_add. >
Thanks for taking a look and suggesting how to detect available terminfo entries. To keep things simple it seems we can start with a static value. We can always make it more dynamic later if needed. As for dumb vs unknown it seems dumb has one less capability: ``` $ infocmp dumb # Reconstructed via infocmp from file: /usr/share/terminfo/d/dumb dumb|80-column dumb tty, am, cols#80, bel=^G, cr=^M, cud1=^J, ind=^J, $ infocmp unknown # Reconstructed via infocmp from file: /usr/share/terminfo/u/unknown unknown|unknown terminal type, am, gn, cols#80, bel=^G, cr=^M, cud1=^J, ind=^J, ``` They are identical except for unknown also having the "gn" capability (generic line type as defined in terminfo(5)). So just going with the "least capable" dumb seems like a good start. Regards, Patrik Lundin