LinuxCommandLibrary

infocmp

Compare or print terminfo descriptions

SYNOPSIS

infocmp [-d] [-c] [-n] [-l] [-r] [-u] [-v] [-0] [-1] [-L] [-C] [-I] [-E] [-A directory] [-B directory] [terminal...]

PARAMETERS

-d
    Report all differences between the two descriptions.

-c
    Indicate which capabilities are present in only one description.

-n
    Print common capabilities.

-l
    Output the description in a long format.

-r
    Reverse the order of comparisons.

-u
    Produce source code that updates the first terminal to look like the second.

-v
    Indicate version of terminfo database used.

-0
    Restricts the width of the output to 160 columns.

-1
    Restricts the width of the output to 80 columns.

-L
    Use termcap-style names for capabilities.

-C
    Use C variable names in the output.

-I
    Force comparison of initial part of long names.

-E
    Cause use_entry() calls to be emitted instead of duplicating strings.

-A directory
    Search in the directory for the first terminal.

-B directory
    Search in the directory for the second terminal.

terminal...
    Terminal names to compare. Defaults to $TERM and "dumb" if none are provided.

DESCRIPTION

infocmp is a command-line utility used to compare terminfo descriptions. It allows you to examine differences between different terminal descriptions, either those installed on your system or custom ones you've created. This is particularly useful for debugging terminal behavior issues, identifying missing capabilities in a terminal definition, or ensuring compatibility across various terminal emulators. It reads terminfo descriptions from either the system's terminfo database (typically located in /usr/share/terminfo) or from specified files. The output presents the differences in a human-readable format, highlighting which capabilities are present in one description but not the other, or where values differ. infocmp is a valuable tool for system administrators, software developers, and anyone who needs to work with terminal descriptions.

<B>EXIT STATUS</B>

infocmp returns:
0 if the terminals are equivalent,
1 if the terminals are not equivalent, or
2 if an error occurred.

HISTORY

infocmp is part of the ncurses library, which is a widely used terminal handling library for Unix-like systems. The development of ncurses and consequently infocmp, began in the early 1990s as a free software replacement for the proprietary curses library. It is widely used in terminal applications, text-based user interfaces, and system administration tools. The command's purpose is to compare terminal descriptions and verify that applications can communicate properly with diverse terminal types.
infocmp's role has been crucial in ensuring consistent terminal behavior across varied environments.

SEE ALSO

tic(1), tput(1), terminfo(5)

Copied to clipboard