Manages terminfo descriptions.
infocmp [ -d] [ -c] [ -n] [ -I] [ -L] [ -C] [ -r] [ -u] [ -s { d| i| l| c}] [ -v] [ -V] [ -1] [ -w Width] [ -A Directory] [ -B Directory] [TermName...]
The infocmp command manages terminfo descriptions. You can use this command to:
The infocmp command prints the Boolean attributes first, the numeric attributes second, and the string attributes last.
Use the -d, -c, and -n flags to compare entries. The -d flag returns the differences between entries. The -c flag produces a list of the capabilities that are set and in common between two entries. The -n flag returns a list of the capabilities that neither entry has.
To compare terminfo entries, you specify two or more TermName parameters. The infocmp command compares the terminfo description of the first TermName parameter with each of the descriptions for the subsequent TermNames specified. If a capability is defined for only one of the terminal descriptions, the value returned will depend on the type of capability. For Boolean capabilities the infocmp command returns an F, the command returns a -1 for integer capabilities, and null for string capabilities.
Use the -l (uppercase i), -L, -C, and -r flags to produce a source listing for one or more terminals. If you do not specify a TermName parameter, the system uses the TERM environment variable. You can use these source options to produce a source file for a terminfo binary when one is not available.
The I (uppercase i) flag produces a listing with the terminfo names. The -L flag produces a listing using the long C variable names listed in /usr/include/term.h.
The -C flag uses termcap names instead of terminfo capability names when producing the source listing. The infocmp commands translates and outputs only those terminfo capabilities that have a corresponding termcap code name. To remove this restriction, specifying the -r flag. This flag causes the command to output terminfo capabilities that cannot be translated into termcap format.
When using the -C and -r flags, the infocmp command notes any string parameters it was unable to convert to the termcap format. You must edit these parameters manually. The command collects all padding information for strings together and places it at the beginning of the string where termcap expects it. Mandatory padding is optional after translation. Mandatory padding is padding information with a trailing / (slash).
Note: The -C and -r flags cannot always convert a terminfo string into its equivalent termcap form. Similarly, a conversion from the termcap file format back into the terminfo file format does not necessarily reproduce the original source.
Given a list of terminal menus and the -u flag, the infocmp command compares the first terminal's description against the other terminal descriptions. The infocmp command then creates a new description for the first terminal using as much of the subsequent terminal descriptions as possible.
When you specify the -u flag and a list of terminal names, the infocmp command does the following:
The new description for the first terminal will have the following:
Note: The @ implies that the capability does not exist.
You can change a description and specify a capability after the use attribute. If this capability is also found in the terminal referenced by the use attribute, the second capability takes precedence over the one referenced by the use attribute.
By default, terminal descriptions appear in the system terminfo database directory, /usr/share/lib/terminfo. You can specify a different database location with the TERMINFO environment variable. The infocmp command first checks to see if this variable exists. If the variable does not exist, the command uses the system terminfo database.
You can use the -A and -B flag with the infocmp command to override the system database. The -A flag identifies the terminfo database for the first TermName parameter. The -B flag identifies the database to use for any subsequent terminals you name. Together, these flags make it possible to compare descriptions for two terminals with the same name located in two different databases.
infocmp -c aixterm lft
infocmp -n
infocmp -I lft
infocmp -A /tmp -u my_term lft
/usr/share/lib/terminfo | Contains the compiled terminal description database. |
The tic and captoinfo commands.
The terminfo file format.