infotocap
Convert terminfo descriptions to termcap format
SYNOPSIS
infotocap [-v] [-1] [-w width] [-n] terminal
PARAMETERS
terminal
The name of the terminal whose capabilities are to be displayed. This name must correspond to an entry in the terminfo database.
-v
Verbose output, showing terminfo comments as well as capability values.
-1
Produce a single-line listing.
-w width
Specify the screen width to use. By default, infotocap uses the terminal's screen width. The minimum value allowed is 1.
-n
Do not check for narrow terminals when formatting the output (useful for using command with scripts)
DESCRIPTION
The infotocap command is a utility that dumps the capabilities of a terminal described in the terminfo database (typically /usr/share/terminfo). It retrieves this information and presents it in a readable format, typically as a series of termcap-style entries.
The command is mainly used for debugging and examining terminal capabilities. It can be helpful for understanding how a terminal interacts with programs, determining if a particular terminal is supported, or troubleshooting issues related to terminal display. It provides a lower-level interface to the terminfo database compared to higher-level libraries used by applications.
EXIT STATUS
infotocap returns 0 upon successful completion. If the specified terminal is not found in the terminfo database, it returns a non-zero exit status.
TERMINFO DATABASE
The terminfo database is a collection of text files that describe the capabilities of various terminals. These files are typically located in /usr/share/terminfo, but the location can be influenced by the TERMINFO environment variable.
HISTORY
The infotocap command is part of the ncurses library, a widely used terminal handling library for Unix-like systems. It evolved alongside the terminfo database and tools, providing a way to inspect the terminal capabilities defined by the terminfo entries. Early terminal capabilities were handled by termcap, a predecessor to terminfo, and infotocap provides a termcap-style output of terminfo entries.
Over time, terminfo became the standard for defining terminal characteristics. infotocap has maintained its role as a utility for examining the raw data stored within the terminfo database, offering insights into terminal behavior.