Linux command
infocmp 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Show current terminal capabilities
infocmp
Show a specific terminal type
infocmp [xterm-256color]
Compare two terminal descriptions
infocmp -d [xterm] [xterm-256color]
Output in terminfo source format
infocmp -I [xterm]
Show capabilities one per line
infocmp -1 [xterm]
Output in termcap format
infocmp -C [xterm]
Generate relative description
infocmp -u [xterm-256color] [xterm]
说明
infocmp compares or prints out terminal capability descriptions from the terminfo database. It can rewrite descriptions to use the use= field for sharing common capabilities, compare binary entries between different terminal types, and output in several formats including terminfo source and termcap. The command reads compiled terminfo entries and outputs them in a readable format. It is useful for debugging terminal issues, understanding terminal features, and preparing terminfo source files for compilation with tic.
参数
- -d
- Show differences between two terminal descriptions.
- -c
- Show common capabilities between two terminals.
- -n
- Show capabilities common to both, listing those that differ.
- -u
- Produce a terminfo source relative to other entries using use= fields.
- -I
- Output in terminfo source format.
- -C
- Output in termcap format.
- -L
- Use long C variable names in output.
- -1
- Print one capability per line.
- -r
- Show resolved paths for terminfo entries.
- -E
- Dump capabilities as C initializer tables for a TERMTYPE structure.
- -e
- Dump capabilities as a C initializer for a TERMTYPE structure.
- -F
- Compare terminfo files, reporting matches and differences between entries.
- -A _dir_
- Use the specified directory for the first terminal's terminfo database.
- -B _dir_
- Use the specified directory for the second terminal's terminfo database.
FAQ
What is the infocmp command used for?
infocmp compares or prints out terminal capability descriptions from the terminfo database. It can rewrite descriptions to use the use= field for sharing common capabilities, compare binary entries between different terminal types, and output in several formats including terminfo source and termcap. The command reads compiled terminfo entries and outputs them in a readable format. It is useful for debugging terminal issues, understanding terminal features, and preparing terminfo source files for compilation with tic.
How do I run a basic infocmp example?
Run `infocmp` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -d do in infocmp?
Show differences between two terminal descriptions.