captoinfo(1M)

πŸ“¦
version 6.6_p20260516 Β· 5 versions
, in alpine 3.24, arch rolling, fedora 44, nixos 26.05, nixpkgs unstable

πŸ’– captoinfo β€” convert a termcap description into a terminfo description πŸ’–

okay bestie, so this is captoinfo(1M), from the User commands section of the manual. she's a little translator fairy and she's about to make your crusty old termcap entries look ✨brand new✨ 🧚


✨ SYNOPSIS ✨

captoinfo [tic-option] [file ...]

captoinfo -V

🌸 DESCRIPTION 🌸

so like, captoinfo translates terminal descriptions, periodt. she looks in each text file you hand her for termcap entries, and for every single one she finds, she writes an equivalent terminfo description to the standard output stream. and the termcap tc capabilities? those translate to terminfo β€œuse” capabilities. slay πŸ’…

if you don't specify any files, captoinfo interprets the content of the environment variable TERMCAP as a file name, and extracts only the entry for the terminal type named in the environment variable TERM from it. and if TERMCAP isn't set? then she just reads /etc/termcap. no biggie πŸŽ€

this utility is literally implemented as a link to tic(1M), with the latter's -I option implied. so you can use other tic options like -1, -f, -v, -w, and -x too. and the -V option reports the version of ncurses associated with this program and exits with a successful status. iconic behavior fr fr πŸ‘‘


πŸ¦‹ Translations from Nonstandard Capabilities πŸ¦‹

captoinfo translates some obsolete, nonstandard capabilities into standard terminfo capabilities. she issues a diagnostic to the standard error stream for each one, inviting the user to check that she hasn't mistakenly translated an unknown or mistyped capability name. she's careful like that 🫢

here's the whole termcap Code glow-up list β€” Obsolete code, Standard code, Origin, and the terminfo capability it becomes:

  • BO β†’ mr β€” AT&T β€” enter_reverse_mode
  • CI β†’ vi β€” AT&T β€” cursor_invisible
  • CV β†’ ve β€” AT&T β€” cursor_normal
  • DS β†’ mh β€” AT&T β€” enter_dim_mode
  • EE β†’ me β€” AT&T β€” exit_attribute_mode
  • FE β†’ LF β€” AT&T β€” label_on
  • FL β†’ LO β€” AT&T β€” label_off
  • XS β†’ mk β€” AT&T β€” enter_secure_mode
  • EN β†’ @7 β€” XENIX β€” key_end
  • GE β†’ ae β€” XENIX β€” exit_alt_charset_mode
  • GS β†’ as β€” XENIX β€” enter_alt_charset_mode
  • HM β†’ kh β€” XENIX β€” key_home
  • LD β†’ kL β€” XENIX β€” key_dl
  • PD β†’ kN β€” XENIX β€” key_npage
  • PN β†’ po β€” XENIX β€” prtr_off
  • PS β†’ pf β€” XENIX β€” prtr_on
  • PU β†’ kP β€” XENIX β€” key_ppage
  • RT β†’ @8 β€” XENIX β€” kent
  • UP β†’ ku β€” XENIX β€” kcuu1
  • KA β†’ k; β€” Tektronix β€” key_f10
  • KB β†’ F1 β€” Tektronix β€” key_f11
  • KC β†’ F2 β€” Tektronix β€” key_f12
  • KD β†’ F3 β€” Tektronix β€” key_f13
  • KE β†’ F4 β€” Tektronix β€” key_f14
  • KF β†’ F5 β€” Tektronix β€” key_f15
  • BC β†’ Sb β€” Tektronix β€” set_background
  • FC β†’ Sf β€” Tektronix β€” set_foreground
  • HS β†’ mh β€” IRIX β€” enter_dim_mode

XENIX termcap had a 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

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. bye girl πŸ’€

AIX has a terminfo facility descended from SVr2 terminfo, but which is incompatible with the SVr4 format. captoinfo translates the following AIX extensions β€” here's the IBM β†’ X/Open pipeline:

  • ksel β†’ kslt
  • kbtab β†’ kcbt
  • font0 β†’ s0ds
  • font1 β†’ s1ds
  • font2 β†’ s2ds
  • font3 β†’ s3ds

she furthermore translates the AIX box1 capability to an acs_chars (acsc) string capability. versatile queen πŸ‘‘

and the HP-UX terminfo library supports two nonstandard terminfo capabilities: memory_lock (meml) and memory_unlock (memu). captoinfo discards these with a warning message. not her vibe, moving on πŸ™ˆ


πŸ“ FILES πŸ“

  • /etc/termcap β€” default termcap terminal capability database

⭐ EXTENSIONS ⭐

this command is an SVr4 curses and ncurses extension. fancy ✨


πŸ’œ PORTABILITY πŸ’œ

  • X/Open Curses Issue 7 (2009) does not specify this command. (rude of them honestly)
  • SVr4 systems provide captoinfo as a separate application from tic. its -v option does not accept a trace level argument n; repeat -v n times instead.
  • NetBSD does not provide this application.

πŸ‘‘ AUTHORS πŸ‘‘

Eric S. Raymond <esr@snark.thyrsus.com> and Thomas E. Dickey <dickey@invisible-island.net>


🌈 SEE ALSO 🌈

infocmp(1M), tic(1M), curses(3X), terminfo(5)


and that's the whole page bestie!! this one's brought to you by ncurses 6.6, dated 2025-11-11 πŸ’– go forth and translate those terminal descriptions, you absolute legend πŸ¦‹βœ¨

πŸ“¦ where this page comes from