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_mode
  • CI (obsolete) β†’ vi (standard) β€” origin: AT&T β€” terminfo capability: cursor_invisible
  • CV (obsolete) β†’ ve (standard) β€” origin: AT&T β€” terminfo capability: cursor_normal
  • DS (obsolete) β†’ mh (standard) β€” origin: AT&T β€” terminfo capability: enter_dim_mode
  • EE (obsolete) β†’ me (standard) β€” origin: AT&T β€” terminfo capability: exit_attribute_mode
  • FE (obsolete) β†’ LF (standard) β€” origin: AT&T β€” terminfo capability: label_on
  • FL (obsolete) β†’ LO (standard) β€” origin: AT&T β€” terminfo capability: label_off
  • XS (obsolete) β†’ mk (standard) β€” origin: AT&T β€” terminfo capability: enter_secure_mode
  • EN (obsolete) β†’ @7 (standard) β€” origin: XENIX β€” terminfo capability: key_end
  • GE (obsolete) β†’ ae (standard) β€” origin: XENIX β€” terminfo capability: exit_alt_charset_mode
  • GS (obsolete) β†’ as (standard) β€” origin: XENIX β€” terminfo capability: enter_alt_charset_mode
  • HM (obsolete) β†’ kh (standard) β€” origin: XENIX β€” terminfo capability: key_home
  • LD (obsolete) β†’ kL (standard) β€” origin: XENIX β€” terminfo capability: key_dl
  • PD (obsolete) β†’ kN (standard) β€” origin: XENIX β€” terminfo capability: key_npage
  • PN (obsolete) β†’ po (standard) β€” origin: XENIX β€” terminfo capability: prtr_off
  • PS (obsolete) β†’ pf (standard) β€” origin: XENIX β€” terminfo capability: prtr_on
  • PU (obsolete) β†’ kP (standard) β€” origin: XENIX β€” terminfo capability: key_ppage
  • RT (obsolete) β†’ @8 (standard) β€” origin: XENIX β€” terminfo capability: kent
  • UP (obsolete) β†’ ku (standard) β€” origin: XENIX β€” terminfo capability: kcuu1
  • KA (obsolete) β†’ k; (standard) β€” origin: Tektronix β€” terminfo capability: key_f10
  • KB (obsolete) β†’ F1 (standard) β€” origin: Tektronix β€” terminfo capability: key_f11
  • KC (obsolete) β†’ F2 (standard) β€” origin: Tektronix β€” terminfo capability: key_f12
  • KD (obsolete) β†’ F3 (standard) β€” origin: Tektronix β€” terminfo capability: key_f13
  • KE (obsolete) β†’ F4 (standard) β€” origin: Tektronix β€” terminfo capability: key_f14
  • KF (obsolete) β†’ F5 (standard) β€” origin: Tektronix β€” terminfo capability: key_f15
  • BC (obsolete) β†’ Sb (standard) β€” origin: Tektronix β€” terminfo capability: set_background
  • FC (obsolete) β†’ Sf (standard) β€” origin: Tektronix β€” terminfo capability: set_foreground
  • HS (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 corner
  • G3 β€” lower left corner
  • G1 β€” upper right corner
  • G4 β€” lower right corner
  • GR β€” tee pointing right
  • GL β€” tee pointing left
  • GU β€” tee pointing up
  • GD β€” tee pointing down
  • GH β€” horizontal line
  • GV β€” vertical line
  • GC β€” intersection
  • G6 β€” double upper left corner
  • G7 β€” double lower left corner
  • G5 β€” double upper right corner
  • G8 β€” double lower right corner
  • Gr β€” double tee pointing right
  • Gr β€” double tee pointing left
  • Gu β€” double tee pointing up
  • Gd β€” double tee pointing down
  • Gh β€” double horizontal line
  • Gv β€” double vertical line
  • Gc β€” double intersection
  • GG β€” 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 β†’ kslt
  • kbtab β†’ kcbt
  • font0 β†’ s0ds
  • font1 β†’ s1ds
  • font2 β†’ s2ds
  • font3 β†’ 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 captoinfo as a separate application from tic. and heads up: its -v option does not accept a trace level argument n; repeat -v n times instead. so like -v -v -v energy, 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