infocmp - Compare or print the terminal description

Format

infocmp [-ducn] [-ILC] [-1Vv] [-s d|i|l|c] [-A directory] [-B directory] [term_names...]

Description

infocmp compares terminfo database entries, or prints a terminfo database entry. Output is written to standard output.

The Curses application uses the terminfo database, which contains a list of terminal descriptions. This enables you to manipulate a terminal's display regardless of the terminal type. To create the terminfo database, use tic. For information about the terminfo database, see Customizing the terminfo database in z/OS UNIX System Services Planning.

For more information about curses, see Using the module map to improve performance in z/OS Common Debug Architecture User's Guide.

Options

d
Prints the two terminal definitions showing the differences between the capabilities.
u
Prints the differences between the two terminal definitions.
c
Prints entries that are common to the two terminfo databases.
n
Does not print entries in either terminfo database.
I
Prints the current terminal description using capname. (capname is the short name for a capability specified in the terminfo source file.)
C
Prints the current terminal description using termcap.
L
Prints the current terminal description using variables (names that the curses functions can use when working with the terminfo database)
1
Single-column output.
V
Prints the program version.
v
Prints debugging information (verbose) to standard error
s
Changes sort order of the fields printed.
d
Sorts by database
i
Sorts by terminfo
c
Sorts by termcap
l
Sorts by the variables (names that the curses function can use when working with the terminfo database)
A
First terminfo database.
B
Other terminfo database.
term_names
Names of entries to be processed.

Usage notes

When displaying terminal database information for entries that are to be processed, infocmp operates as follows:

  1. If you omit term_names, infocmp locates the terminal database information specified by the TERM environment variable and displays that as the entry's terminal database information.
  2. If you specify a single term_name, infocmp displays terminal database information for that named entry.
  3. If you specify more than one term_name, infocmp displays the results of a terminal database comparison between all of the specified term_names.

Examples

  1. To print out the current terminal description using capname, issue:
    infocmp
    You will see:
    infocmp ibm3101
    #    Reconstructed via infocmp from file:/usr/share/lib/terminfo/i
    ibm3101|IBM 3101-10:\
    
    ibm3101|IBM 3101-10,
       am,
       cols#80, lines#24,
       bel=¬?, clear=¬.\322, cr=\r, cub1=\b, cud1=\n,
       cuf1=¬.\303,
  2. To print out the current terminal description using the curses capability names, issue:
    infocmp -L
    You will get:
    infocmp -L ibm3101
    #    Reconstructed via infocmp from file:/usr/share/lib/terminfo/i
    ibm3101|IBM 3101-10:\
    
    Terminal type ibm3101
      ibm3101|IBM 3101-10
    flags
      auto_right_margin,
    
    numbers
      columns = 80, lines = 24,
    
    strings
      bell = '¬?', carriage_return = '\r', clear_all_tabs = '¬.\310',
      clear_screen = '¬.\322', clr_eol = '¬.\311', clr_eos = '¬.\321',
  3. To print out the current terminal description using capname, issue:
    infocmp -I
    You will get:
    infocmp -I ibm3101
    #    Reconstructed via infocmp from file:/usr/share/lib/terminfo/i
    ibm3101|IBM 3101-10:\
    
    ibm3101|IBM 3101-10,
       am,
       cols#80, lines#24,
       bel=¬?, clear=¬.\322, cr=\r, cub1=\b, cud1=\n,
       cuf1=¬.\303,
  4. To print out the current terminal description using termcap, issue:
    infocmp -C
    You will get:
    infocmp -C ibm3101
    #    Reconstructed via infocmp from file:/usr/share/lib/terminfo/i
    ibm3101|IBM 3101-10:\
       :am:bs:\
       :.co#80:li#24:kn#2:\
       :.cd=\EJ:.ce=\EI:.cl=\EK:\
       :.c:.cm=\EY%p1%' '%+%c%p2%'
    '%+%c:.ct=\EH:.ho=\EH:\
       :.nd=\EC:.st=\E0:.up=\EA:
  5. To print entries in single-column format, issue:
    infocmp -1
    You will get:
    infocmp -C -1 ibm3101
    #    Reconstructed via infocmp from file:/usr/share/lib/terminfo/i
    ibm3101|IBM 3101-10:\
       :am:\
       :bs:\
       :co#80:\
       :li#24:\
       :kn#2:\
       :.cd=\EJ:\
       :.ce=\EI:\
       :.cl=\EK:\
  6. To print the two terminal definitions showing the difference between the capabilities (F indicates False, entry not present; T indicates True, entry present):
    infocmp -d ibm3101 hft--c
    You will get:
    #    Reconstructed via infocmp from file:/usr/share/lib/terminfo/i
    ibm3101|IBM 3101-10:\
            comparing ibm3101 to hft-c.
               comparing booleans.
               bw:F:T.
               msgr:F:T.
               xon:F:T.
                 comparing numbers.
               it:-1:8.
               lines:24:25.
                 comparing strings.
               batt1:'NULL','\206\361'.
               batt2:'NULL','\206\361\224\204'.
    To print the capabilities that are different between the two terminal definitions. The values for the first terminal definitions are shown.
    infocmp -u ibm3101 hft-c
    You will get:
    #    Reconstructed via infocmp from file:/usr/share/lib/terminfo/i
    ibm3101|IBM 3101-10:\
            ibm3101|IBM 3101-10,
                bw@, msgr@, xon@,
                it@, lines#24,
                batt1@, batt2@, blink@, bold@, box1@, box2@,
                clear=¬.\322, colb0@, colb1@, colb2@, colb3@, colb4@,
                colb5@, colb6@, colb7@, colf0@, colf1@, colf2@,
                colf3@, colf4@, colf5@, colf6@, colf7@, cub@, cud@,
                cuf@, cuf1=¬.\303,
  7. To print the capabilities that are the same in both terminal definitions, issue:
    infocmp -c ibm3101 hft-c
    You will get:
    #    Reconstructed via infocmp from file:/usr/share/lib/terminfo/i
    ibm3101|IBM 3101-10:\
         comparing ibm3101 to hft-c.
            comparing booleans.
               am= T.
            comparing numbers.
               cols= 80.
            comparing strings.
               bel= '¬?'.
               cr= '\r'.
               cub1= '\b'.
               cud1= '\n'.
  8. To print the capabilities that are not found in either terminal definition, issue:
    infocmp -u ibm3101 hft-c
    You will get:
    #    Reconstructed via infocmp from file:/usr/share/lib/terminfo/i
    ibm3101|IBM 3101-10:\
       comparing ibm3101 to hft-c.
          comparing booleans.
             !bce.
             !ccc.
             !chts.
             !cpix.
             !crxm.
             !da.
             !daisy.

Environment variables

infocmp uses the following environment variables:
TERMINFO
Contains the path name of the terminfo database.
TERM
Contains the name of your terminal, that is, the current terminal definition.

Related information

captoinfo, tic