netbsd-curses icon indicating copy to clipboard operation
netbsd-curses copied to clipboard

Add toe utility

Open tpimh opened this issue 8 years ago • 7 comments

toe - table of (terminfo) entries

With no options, toe lists all available terminal types by primary name with descriptions. File arguments specify the directories to be scanned; if no such arguments are given, your default terminfo direc‐ tory is scanned. If you also specify the -h option, a directory header will be issued as each directory is entered.

tpimh avatar Sep 15 '17 03:09 tpimh

i just wanted to add it, then noticed that this tool is not even in netbsd proper... probably because netbsd curses doesn't use terminfo directories at all (but a single binary database instead).

rofl0r avatar Sep 20 '17 22:09 rofl0r

Well, if it's not toe, there should be some other utility to print the contents of this binary database.

tpimh avatar Sep 21 '17 09:09 tpimh

$ infocmp xterm-256color
# Reconstructed from /home/rofl/.terminfo.cdb
xterm-256color|xterm with 256 colors,
        am, bce, ccc, km, mc5i, mir, msgr, npc, xenl,
        colors#256, cols#80, it#8, lines#24, pairs#32767,

is that about what you imagined ?

rofl0r avatar Sep 21 '17 14:09 rofl0r

Well, not exactly. It always shows only xterm-256color, but I'm sure there should also be at least vt100 and other popular options.

tpimh avatar Sep 21 '17 21:09 tpimh

so basically you want it to print a list of all built-in supported TERMs, for use with infocmp to query the details ?

rofl0r avatar Sep 22 '17 00:09 rofl0r

Yes, is it possible with infocmp?

tpimh avatar Sep 22 '17 09:09 tpimh

it seems the listing aspect is currently not implemented, but it would be trivial to add it (less than 10 lines, i'd guess). i'll forward this to Roy Marples and see what he thinks about it.

rofl0r avatar Sep 22 '17 10:09 rofl0r