tic
Compile terminfo descriptions into terminal database
TLDR
Compile and install terminfo for a terminal
Check terminfo file for errors
Print database locations
SYNOPSIS
tic [options] file...
PARAMETERS
file...
One or more input files containing terminfo source descriptions. If no files are given, tic reads from standard input.
-c
Check only: Parse the input files but do not write any compiled entries. Useful for syntax validation.
-e names
Compile only the entries specified by a comma-separated list of names from the input files. Other entries are ignored.
-f
Force writing of entries, even if an identical entry already exists in the database. By default, tic will not overwrite identical entries.
-I dir
Add dir to the list of directories to search for include files referenced within the terminfo source.
-L
Translate names for old ncurses libraries, ensuring compatibility with older applications or ncurses versions.
-N
Suppress checks for ncurses extensions when compiling. This might be useful for strict terminfo compliance.
-o dir
Specify the output directory where the compiled terminfo entries should be stored. Defaults to the standard terminfo database path.
-r
Force recompilation of all entries. This will overwrite existing entries, even if they appear identical.
-s
Silent mode: Suppress warnings during compilation. Only errors will be reported.
-u
Unlimit: Allow very long names or string capabilities beyond the traditional terminfo limits. Useful for extended descriptions.
-v[n]
Verbose mode: Increase the verbosity level of output. A higher number n (e.g., -v2, -v3) produces more detailed messages.
-V
Print the version of tic and the ncurses library it uses, then exit.
-x
Allow extended capabilities: Process terminfo source files that use extended (user-defined) capabilities not standard in the terminfo database.
DESCRIPTION
The tic (terminfo compiler) command compiles a terminfo source description into a binary format. Terminfo source files describe the capabilities of terminals, allowing applications like ncurses-based programs to adapt their behavior to different terminal types. The compiled entries are stored in a hierarchical database, typically located at /usr/share/terminfo or ~/.terminfo. When a program needs to know about a terminal's capabilities (e.g., how to clear the screen, move the cursor, or set colors), it queries this database. tic is an essential tool for maintaining and extending the terminfo database, enabling support for new terminals or custom terminal configurations.
CAVEATS
Compiling a terminfo entry overwrites any existing entry with the same name. Always back up your terminfo database or test new entries carefully before deploying to a production environment. Incorrectly compiled or malformed entries can lead to display issues or errors in terminal applications. Be aware of the search order for terminfo databases, as a local entry in ~/.terminfo can override a system-wide entry.
TERMINFO DATABASE LOCATION
By default, tic compiles entries into the terminfo database located at /usr/share/terminfo (system-wide) or /etc/terminfo. Users can also have a private terminfo database in their home directory, typically at ~/.terminfo. The TERMINFO environment variable can be used to specify an alternative base directory for the terminfo database.
ENVIRONMENT VARIABLES
- TERMINFO: Specifies the path to the terminfo database directory. If set, tic will write to this directory.
- TERMINFO_DIRS: A colon-separated list of directories to search for terminfo entries, used by applications (not primarily by tic for writing, but relevant for understanding database interaction).
HISTORY
The tic command is a fundamental component of the ncurses (new curses) library, which is a free software emulation of the System V Release 4.0 (SVr4) curses library. The curses library itself originated in BSD Unix and was later standardized by POSIX. Terminfo was introduced in SVr2 as a successor to the simpler termcap system, providing a more structured and extensible way to describe terminal capabilities. tic was developed as part of the ncurses project to compile these terminfo source descriptions into the binary format used by terminal-aware applications, ensuring continued compatibility and flexibility for a wide range of terminal types.