captoinfo(1)
π¦ captoinfo β the termcap-to-terminfo glow-up machine π¦
okay so bestie, welcome to captoinfo(1) from the User commands manual section. this little icon takes your crusty old termcap descriptions and serves them as shiny terminfo ones. it's giving translator, it's giving glow-up, and honestly? we're obsessed. π
β¨ NAME β¨
captoinfo β convert a termcap description into a terminfo description π«Ά
β¨ SYNOPSIS β¨
captoinfo [tic-option] [file ...]
captoinfo -V
β¨ DESCRIPTION β¨
so captoinfo translates terminal descriptions, periodt. it peeks inside each text file you hand it, hunts for termcap entries, and for every single one it finds, it writes out an equivalent terminfo description to the standard output stream. and the termcap tc capabilities? those become terminfo βuseβ capabilities. iconic behavior fr fr. π
if you pass no files at all, captoinfo treats the content of the environment variable TERMCAP as a file name, and pulls out only the entry for the terminal type named in the environment variable TERM from it. and if TERMCAP isn't set either? then it just reads /etc/termcap. the classic. π
ngl this utility is literally implemented as a link to tic(1), with the latter's -I option implied. so you can absolutely use other tic options like -1, -f, -v, -w, and -x. and the -V option reports the version of ncurses associated with this program and exits with a successful status. slay. β¨
πΈ Translations from Nonstandard Capabilities πΈ
okay this is the part where captoinfo gets its little makeover hands out. it translates some obsolete, nonstandard capabilities into standard terminfo capabilities. and for each one it issues a diagnostic to the standard error stream, inviting you to check that it hasn't mistakenly translated an unknown or mistyped capability name. so like, it's polite about it. π
π termcap Code β Obsolete β Standard
BO(obsolete) βmr(standard) β origin: AT&T β terminfo capability:enter_reverse_modeCI(obsolete) βvi(standard) β origin: AT&T β terminfo capability:cursor_invisibleCV(obsolete) βve(standard) β origin: AT&T β terminfo capability:cursor_normalDS(obsolete) βmh(standard) β origin: AT&T β terminfo capability:enter_dim_modeEE(obsolete) βme(standard) β origin: AT&T β terminfo capability:exit_attribute_modeFE(obsolete) βLF(standard) β origin: AT&T β terminfo capability:label_onFL(obsolete) βLO(standard) β origin: AT&T β terminfo capability:label_offXS(obsolete) βmk(standard) β origin: AT&T β terminfo capability:enter_secure_modeEN(obsolete) β@7(standard) β origin: XENIX β terminfo capability:key_endGE(obsolete) βae(standard) β origin: XENIX β terminfo capability:exit_alt_charset_modeGS(obsolete) βas(standard) β origin: XENIX β terminfo capability:enter_alt_charset_modeHM(obsolete) βkh(standard) β origin: XENIX β terminfo capability:key_homeLD(obsolete) βkL(standard) β origin: XENIX β terminfo capability:key_dlPD(obsolete) βkN(standard) β origin: XENIX β terminfo capability:key_npagePN(obsolete) βpo(standard) β origin: XENIX β terminfo capability:prtr_offPS(obsolete) βpf(standard) β origin: XENIX β terminfo capability:prtr_onPU(obsolete) βkP(standard) β origin: XENIX β terminfo capability:key_ppageRT(obsolete) β@8(standard) β origin: XENIX β terminfo capability:kentUP(obsolete) βku(standard) β origin: XENIX β terminfo capability:kcuu1KA(obsolete) βk;(standard) β origin: Tektronix β terminfo capability:key_f10KB(obsolete) βF1(standard) β origin: Tektronix β terminfo capability:key_f11KC(obsolete) βF2(standard) β origin: Tektronix β terminfo capability:key_f12KD(obsolete) βF3(standard) β origin: Tektronix β terminfo capability:key_f13KE(obsolete) βF4(standard) β origin: Tektronix β terminfo capability:key_f14KF(obsolete) βF5(standard) β origin: Tektronix β terminfo capability:key_f15BC(obsolete) βSb(standard) β origin: Tektronix β terminfo capability:set_backgroundFC(obsolete) βSf(standard) β origin: Tektronix β terminfo capability:set_foregroundHS(obsolete) βmh(standard) β origin: IRIX β terminfo capability:enter_dim_mode
π§ XENIX termcap extension capabilities
XENIX termcap had a whole set of extension capabilities, corresponding to box drawing characters of CCSID (βcode pageβ) 437, as follows. look at these little art supplies: π¨
G2β upper left cornerG3β lower left cornerG1β upper right cornerG4β lower right cornerGRβ tee pointing rightGLβ tee pointing leftGUβ tee pointing upGDβ tee pointing downGHβ horizontal lineGVβ vertical lineGCβ intersectionG6β double upper left cornerG7β double lower left cornerG5β double upper right cornerG8β double lower right cornerGrβ double tee pointing rightGrβ double tee pointing leftGuβ double tee pointing upGdβ double tee pointing downGhβ double horizontal lineGvβ double vertical lineGcβ double intersectionGGβ ACS magic cookie count
and here's the tea: captoinfo composes single-line box-drawing capabilities into a terminfo acs_chars (acsc) string capability, and discards GG and double-line capabilities with a warning diagnostic. so yeah, some of those pretties get dropped and it will tell you about it. π
π AIX extensions
AIX has a terminfo facility descended from SVr2 terminfo, but which is incompatible with the SVr4 format. captoinfo translates the following AIX extensions β IBM on the left, X/Open on the right:
kselβksltkbtabβkcbtfont0βs0dsfont1βs1dsfont2βs2dsfont3βs3ds
it furthermore translates the AIX box1 capability to an acs_chars (acsc) string capability. versatile queen. π
and lastly, the HP-UX terminfo library supports two nonstandard terminfo capabilities: memory_lock (meml) and memory_unlock (memu). captoinfo discards these with a warning message. sorry bestie, they didn't make the cut. π
β¨ FILES β¨
/etc/termcapβ default termcap terminal capability database
β¨ EXTENSIONS β¨
this command is an SVr4 curses and ncurses extension. fancy, right? β
β¨ PORTABILITY β¨
- X/Open Curses Issue 7 (2009) does not specify this command. nope, not even a little.
- SVr4 systems provide
captoinfoas a separate application fromtic. and heads up: its-voption does not accept a trace level argumentn; repeat-vntimes instead. so like-v -v -venergy, not-v 3. π - NetBSD does not provide this application. at all. not a vibe. π
β¨ AUTHORS β¨
Eric S. Raymond <esr@snark.thyrsus.com> and Thomas E. Dickey <dickey@invisible-island.net>
absolute legends, we stan. π«Ά
β¨ SEE ALSO β¨
infocmp(1), tic(1), ncurses(3NCURSES), terminfo(5)
and that's the whole page bestie!! this was the ncurses 6.6 era, dated 2025-11-11 β go forth and translate your terminal descriptions, you've got this. πβ¨ππ¦πΈπ
π¦ where this page comes from
- ubuntu resolute: ncurses-bin 6.6+20251231-1 Β· MIT/X11
- ubuntu stonking: ncurses-bin 6.6+20260608-2 Β· MIT/X11
- Copyright 2018-2024,2025 Thomas E. Dickey
- Copyright 1998-2010,2016 Free Software Foundation, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms