captoinfo(1M)
π 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_modeCIβviβ AT&T βcursor_invisibleCVβveβ AT&T βcursor_normalDSβmhβ AT&T βenter_dim_modeEEβmeβ AT&T βexit_attribute_modeFEβLFβ AT&T βlabel_onFLβLOβ AT&T βlabel_offXSβmkβ AT&T βenter_secure_modeENβ@7β XENIX βkey_endGEβaeβ XENIX βexit_alt_charset_modeGSβasβ XENIX βenter_alt_charset_modeHMβkhβ XENIX βkey_homeLDβkLβ XENIX βkey_dlPDβkNβ XENIX βkey_npagePNβpoβ XENIX βprtr_offPSβpfβ XENIX βprtr_onPUβkPβ XENIX βkey_ppageRTβ@8β XENIX βkentUPβkuβ XENIX βkcuu1KAβk;β Tektronix βkey_f10KBβF1β Tektronix βkey_f11KCβF2β Tektronix βkey_f12KDβF3β Tektronix βkey_f13KEβF4β Tektronix βkey_f14KFβF5β Tektronix βkey_f15BCβSbβ Tektronix βset_backgroundFCβSfβ Tektronix βset_foregroundHSβ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 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
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βksltkbtabβkcbtfont0βs0dsfont1βs1dsfont2βs2dsfont3β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
captoinfoas a separate application fromtic. its-voption does not accept a trace level argument n; repeat-vn 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
- alpine 3.24: ncurses-doc 6.6_p20260516-r0 Β· X11
- arch rolling: ncurses 6.6-2 Β· MIT-open-group
- fedora 44: ncurses 6.6-1.fc44 Β· MIT-open-group
- nixos 26.05: ncurses 6.6
- nixos 26.05: ncurses-abi5-compat 6.6
- nixpkgs unstable: ncurses 6.6
- nixpkgs unstable: ncurses-abi5-compat 6.6
- 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