infocmp
Compare or print terminfo descriptions
SYNOPSIS
infocmp [-CDEIKLQRtTUVXacdfgipqrsuwx] [-0] [-1] [-A dir] [-B dir] [-F format] [-G] [-J] [-P cols] [-W width] [termname...]
PARAMETERS
-0
Use =0 for padding delays instead of milliseconds
-1
Use =1 for padding delays instead of milliseconds
-A dir
Search terminfo source in dir for $TERMINFO
-B dir
Write compiled output to dir
-C
Translate terminfo to termcap source format
-D
Print paths searched for terminfo files
-E
Dump as C initializer for terminfo structure
-F [format]
Dump as C variable declarations
-G
Display constant string literals using quotes
-I
Sort output by capability name, use terminfo names
-K
Enable terminfo tracing
-L
Include all long capabilities
-Q
Print subset list of capabilities
-R subset
Restrict to terminfo subset
-T
Ignore TERMINFO/TERMINFO_DIRS
-U
Use function-key literals
-V
Print curses version
-X
Print extended capabilities
-a
Print all capabilities
-c
Print common capabilities
-d
Print differing capabilities
-e
Print for emacs .term file
-f
Compare by capability functions
-g
Print constants as numbers
-i
See soft/hard labels
-l
Print verbose labels
-p
Ignore padding differences
-q
Quiet mode, no warnings
-r
Print numerics in raw format
-s [d|n|l|c|i]
Sort by descriptor, name, number, etc.
-u
Print unique capabilities
-w width
Set output width
-x
Print non-standard capabilities
DESCRIPTION
The infocmp command is a key utility from the ncurses library for inspecting and comparing terminfo entries, which are compiled descriptions of terminal capabilities stored in a database (typically under /usr/share/terminfo). Terminfo provides standardized data on how to control various terminals, including cursor movement, colors, and keypad keys.
Without arguments, infocmp prints the terminfo source for the current TERM environment variable. Supplying one or two terminal names enables comparison, showing differing capabilities. Options customize output: highlight differences (-d), sort by capability (-I), generate C code (-E), or convert to legacy termcap (-C). It supports debugging terminal emulators, customizing entries, or verifying database integrity.
For example, comparing xterm and xterm-256color reveals enhanced color support. Output is human-readable source format, compilable with tic. Essential for Unix-like systems handling diverse terminals, it aids in resolving display issues or porting applications.
CAVEATS
Output can be voluminous for complex terminals; some options require ncurses-specific features; comparisons assume same database subsets.
EXAMPLE USAGE
infocmp -d xterm xterm-256color
Displays capability differences like added 256-color support.
infocmp -C TERM=vt100 > vt100.termcap
Converts to termcap.
FILES
Reads from $TERMINFO or /usr/share/terminfo; source in ncurses source tree under ncurses/terminfo.src.
HISTORY
Developed for ncurses (1980s, inspired by 4.4BSD termcap tools), enhanced in ncurses 1.9.7+ for full terminfo support; now standard in most Linux distributions via ncurses package.


