home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / utils / terminal / tput10a.taz / tput10a / usr / emacs / info / tput.info
Encoding:
Text File  |  1992-12-23  |  23.0 KB  |  608 lines

  1. Info file: tput.info,    -*-Text-*-
  2. produced by texinfo-format-buffer
  3. from file: tput.texinfo
  4.  
  5.  
  6. This file documents the the GNU `tput' command for translating terminal
  7. capability names into escape and control codes for a particular
  8. terminal.
  9.  
  10. Copyright (C) 1989-1991 Free Software Foundation, Inc.
  11.  
  12. Permission is granted to make and distribute verbatim copies of this
  13. manual provided the copyright notice and this permission notice are
  14. preserved on all copies.
  15.  
  16. Permission is granted to copy and distribute modified versions of this
  17. manual under the conditions for verbatim copying, provided that the
  18. entire resulting derived work is distributed under the terms of a
  19. permission notice identical to this one.
  20.  
  21. Permission is granted to copy and distribute translations of this manual
  22. into another language, under the above conditions for modified versions,
  23. except that this permission notice may be stated in a translation
  24. approved by the Foundation.
  25.  
  26.  
  27. 
  28. File: tput.info, Node:       Top, Next:     , Prev: (dir), Up: (dir)
  29.  
  30. `tput': Portable Terminal Control for Shell Scripts
  31. ***************************************************
  32.  
  33. The `tput' command translates the terminal-independent name of a
  34. terminal capability into its actual value for the terminal type being
  35. used.  This allows shell scripts to do things like clear the screen,
  36. underline text, and center text no matter how wide the screen is.
  37.  
  38. `tput' takes as an argument the name of a Unix System V terminfo
  39. capability, which it translates into the equivalent termcap capability
  40. name (*Note Capabilities::, for a list of the equivalencies).
  41.  
  42. There are three types of terminfo (and termcap) capabilities: string,
  43. Boolean, and numeric.  String capabilities either cause a special effect
  44. on the terminal when they are displayed or are the value sent by a
  45. special key on the terminal (the latter type are probably of no use in
  46. shell scripts).  Numeric and Boolean capabilities give information about
  47. the terminal such as how many columns wide it is or whether whether it
  48. has a meta key.  *Note Output::, for more detailed information on the
  49. three types of capabilities.
  50.  
  51. The format of the `tput' command is illustrated below, with the optional
  52. portions in square brackets, `[...]':
  53.  
  54.      tput [-T TERMINAL-TYPE] [+terminal=TERMINAL-TYPE] CAPABILITY [PARAMETER ...]
  55.  
  56. Here is an example of how to clear the terminal screen using `tput':
  57.  
  58.      tput clear
  59.  
  60. * Menu:
  61.  
  62. * Using tput::     Using the `tput' command.
  63. * Output::       Output and exit status.
  64. * More Examples::  More examples of using `tput'.
  65. * Capabilities::   Summary of terminfo capabilities.
  66. * Error Messages:: Error messages produced by `tput'.
  67. * Notes::          Miscellaneous information about `tput'.
  68.  
  69. 
  70. File: tput.info, Node: Using tput, Next: Output, Up: Top
  71.  
  72. Using the `tput' Command
  73. ========================
  74.  
  75. The format of the `tput' command is illustrated below, with the optional
  76. portions in square brackets, `[...]':
  77.  
  78.      tput [-T TERMINAL-TYPE] [+terminal=TERMINAL-TYPE] CAPABILITY [PARAMETER ...]
  79.  
  80. Some string capabilities accept parameters, such as the number of lines
  81. to delete or the column to move to.  These parameters are specified on
  82. the command line following the capability name.  They are always
  83. numbers.
  84.  
  85. `-T TERMTYPE'
  86. `+terminal=TERMTYPE'
  87.      This option indicates the type of terminal.  By default, this value
  88.      is taken from the `TERM' environment variable.
  89.  
  90. Below are some example uses of `tput'.  *Note Capabilities::, for a
  91. complete list of the functions that `tput' can cause terminals to
  92. perform.  Note that not all terminals can perform any given function.
  93. *Note More Examples::, for some more complex samples of `tput' use.
  94.  
  95. The following command moves the cursor to row 10, column 30 of the
  96. screen:
  97.  
  98.      tput cup 10 30
  99.  
  100. The following command makes the cursor invisible:
  101.  
  102.      tput civis
  103.  
  104. The following command makes the cursor visible again:
  105.  
  106.      tput cnorm
  107.  
  108. The following command deletes 10 lines below and including the one on
  109. which the cursor is positioned:
  110.  
  111.      tput dl 10
  112.  
  113. 
  114. File: tput.info, Node: Output, Next: More Examples, Prev: Using tput, Up: Top
  115.  
  116. Output and Exit Status
  117. ======================
  118.  
  119. The `tput' command produces different kinds of output for each of the
  120. three types of terminal capabilities: string, numeric, and Boolean.
  121.  
  122. If the terminfo capability given on the command line is a string
  123. capability, `tput' displays its value and exits with a status of 0.  If
  124. the capability is not defined for the terminal type being used, `tput'
  125. produces no output and exits with a status of 1.
  126.  
  127. If the capability is a numeric capability, `tput' displays its value (an
  128. integer).  If the capability is not defined for the terminal type being
  129. used, `tput' displays the value `-1'.  The exit status is always 0 for
  130. numeric capabilities, unless an error occurs (*Note Notes:: for a
  131. complete list of the possible exit status values).
  132.  
  133. If the capability is a Boolean capability, `tput' produces no output and
  134. exits with status 0 if the capability is defined for the terminal type
  135. being used, or status 1 if the capability is not defined.  *Note
  136. Definitions of the Terminal Capabilities: (termcap)Capabilities, for a
  137. more detailed description of termcap capabilities.
  138.  
  139. The values of numeric capabilities should be saved into shell variables
  140. so they can be used later without having to run `tput' again.  Here is
  141. how it can be done:
  142.  
  143.      For the Bourne, Bourne-again, and Korn shells:
  144.  
  145.      To set an environment variable: COLUMNS=`tput cols` export COLUMNS
  146.  
  147.      To set a local variable: tabwidth=`tput it`
  148.  
  149.      For the C shell:
  150.  
  151.      To set an environment variable: setenv COLUMNS `tput cols`
  152.  
  153.      To set a local variable: set tabwidth = `tput it`
  154.  
  155. The values of string capabilities can be saved in shell variables in the
  156. same way, then displayed later using the `echo' command. Since `echo' is
  157. built into most shells, it runs more quickly than `tput' does.  However,
  158. using `echo' instead of `tput' to display string values can cause
  159. problems for capabilities that use padding, because null padding
  160. characters cannot be passed as arguments to commands, including `echo'.
  161.  
  162. 
  163. File: tput.info, Node: More Examples, Next: Capabilities, Prev: Output, Up: Top
  164.  
  165. Yet More Examples
  166. =================
  167.  
  168. Here are some more advanced examples of using `tput'; most involve some
  169. shell programming.  Because the C shell's flow control (decision making)
  170. constructs differ from those of the other shells, these examples do not
  171. work under the C shell.
  172.  
  173. The following sequence of commands prints `I am infalible' and then
  174. crosses it out on terminals that can overstrike, and prints `I am on
  175. strike' on terminals that cannot.
  176.  
  177.      if tput os; then
  178.          echo 'I am infalible\r- -- ---------'
  179.      else
  180.          echo 'I am on strike'
  181.      fi
  182.  
  183. The following example is a shell script that centers a line of text
  184. given as command line arguments.  An alternative approach would be to
  185. have `tput' send the `rep' terminfo capability to print the multiple
  186. spaces instead of using the `while' loop.
  187.  
  188.      COLUMNS=`tput cols` export COLUMNS # Get screen width.
  189.      echo "$@" | awk '
  190.      { spaces = ('$COLUMNS' - length) / 2
  191.        while (spaces-- > 0) printf (" ")
  192.        print
  193.      }'
  194.  
  195. The following commands cause the terminal to save the current cursor
  196. position, print `Hello, World' centered in the screen in reverse video,
  197. then return to the original cursor position.
  198.  
  199.      COLUMNS=`tput cols`
  200.      LINES=`tput lines`
  201.      line=`expr $LINES / 2`
  202.      column=`expr \( $COLUMNS - 6 \) / 2`
  203.      tput sc
  204.      tput cup $line $column
  205.      tput rev
  206.      echo 'Hello, World'
  207.      tput sgr0
  208.      tput rc
  209.  
  210. 
  211. File: tput.info, Node: Capabilities, Next: Error Messages, Prev: More Examples, Up: Top
  212.  
  213. Capabilities
  214. ============
  215.  
  216.  
  217. Boolean Capabilities
  218. --------------------
  219.  
  220.      Name    Termcap Description
  221.              Equiv.
  222.  
  223.      am      am      Has automatic margins
  224.      bw      bw      `cub1' wraps from column 0 to last column
  225.      chts    HC      Cursor is hard to see
  226.      da      da      Display may be retained above screen
  227.      db      db      Display may be retained below screen
  228.      eo      eo      Can erase overstrikes with a blank
  229.      eslok   es      Using escape on status line is ok
  230.      gn      gn      Generic line type (e.g., `dialup', `switch')
  231.      hc      hc      Hardcopy terminal
  232.      hs      hs      Has a status line
  233.      hz      hz      Hazeltine; cannot print tildes
  234.      in      in      Insert mode distinguishes nulls
  235.      km      km      Has a meta key (a shift that sets parity bit)
  236.      mc5i    5i      Data sent to printer does not echo on screen
  237.      mir     mi      Safe to move while in insert mode
  238.      msgr    ms      Safe to move in standout modes
  239.      npc     NP      No pad character is needed
  240.      nrrmc   NR      `smcup' does not reverse `rmcup'
  241.      nxon    nx      Padding does not work; xon/xoff is required
  242.      os      os      Overstrikes
  243.      ul      ul      Underline character overstrikes
  244.      xenl    xn      Newline ignored after 80 columns (Concept)
  245.      xhp     xs      Standout is not erased by overwriting (HP)
  246.      xon     xo      Uses xon/xoff handshaking
  247.      xsb     xb      Beehive (f1=escape, f2=ctrl-c)
  248.      xt      xt      Tabs are destructive, magic `smso' (t1061)
  249.  
  250.  
  251. Numeric Capabilities
  252. --------------------
  253.  
  254.      Name    Termcap Description
  255.              Equiv.
  256.  
  257.      cols    co      Number of columns in a line
  258.      it      it      Width of initial tab settings
  259.      lh      lh      Number of rows in each label
  260.      lines   li      Number of lines on screen or page
  261.      lm      lm      Lines of memory if > `lines'; 0 means varies
  262.      lw      lw      Number of columns in each label
  263.      nlab    Nl      Number of labels on screen (start at 1)
  264.      pb      pb      Lowest baud rate where padding is needed
  265.      vt      vt      Virtual terminal number (CB/Unix)
  266.      wsl     ws      Number of columns in status line
  267.      xmc     sg      Number of blanks left by `smso' or `rmso'
  268.  
  269.  
  270. String Capabilities
  271. -------------------
  272.  
  273. In the following table, `(P)' following an explanation means that the
  274. capability takes one or more parameters (and is evaluated by the
  275. `tparam' function, or in the case of `cup', `tgoto'); `(*)' means that
  276. padding may be based on the number of lines affected; and `#n' refers to
  277. the `n'th parameter.
  278.  
  279.      Name    Termcap Description
  280.              Equiv.
  281.  
  282.      acsc    ac      Graphic character set pairs aAbBcC - default vt100
  283.      bel     bl      Ring bell (beep)
  284.      blink   mb      Begin blinking mode
  285.      bold    md      Begin double intensity mode
  286.      cbt     bt      Back tab
  287.      civis   vi      Make cursor invisible
  288.      clear   cl      Clear screen (*)
  289.      cmdch   CC      Settable command character in prototype
  290.      cnorm   ve      Make cursor normal (undo `cvvis' & `civis)'
  291.      cr      cr      Carriage return (*)
  292.      csr     cs      Change scrolling region to lines #1 through #2 (P)
  293.      cub     LE      Move cursor left #1 spaces (P)
  294.      cub1    le      Move cursor left one space
  295.      cud     DO      Move cursor down #1 lines (P*)
  296.      cud1    do      Move cursor down one line
  297.      cuf     RI      Move cursor right #1 spaces (P*)
  298.      cuf1    nd      Move cursor right one space
  299.      cup     cm      Move cursor to row #1, column #2 of screen (P)
  300.      cuu     UP      Move cursor up #1 lines (P*)
  301.      cuu1    up      Move cursor up one line
  302.      cvvis   vs      Make cursor very visible
  303.      dch     DC      Delete #1 characters (P*)
  304.      dch1    dc      Delete one character (*)
  305.      dim     mh      Begin half intensity mode
  306.      dl      DL      Delete #1 lines (P*)
  307.      dl1     dl      Delete one line (*)
  308.      dsl     ds      Disable status line
  309.      ech     ec      Erase #1 characters (P)
  310.      ed      cd      Clear to end of display (*)
  311.      el      ce      Clear to end of line
  312.      el1     cb      Clear to beginning of line, inclusive
  313.      enacs   eA      Enable alternate character set
  314.      ff      ff      Form feed for hardcopy terminal (*)
  315.      flash   vb      Visible bell (must not move cursor)
  316.      fsl     fs      Return from status line
  317.      hd      hd      Move cursor down one-half line
  318.      home    ho      Home cursor (if no `cup')
  319.      hpa     ch      Move cursor to column #1 (P)
  320.      ht      ta      Tab to next 8 space hardware tab stop
  321.      hts     st      Set a tab in all rows, current column
  322.      hu      hu      Move cursor up one-half line
  323.      ich     IC      Insert #1 blank characters (P*)
  324.      ich1    ic      Insert one blank character
  325.      if      if      Name of file containing initialization string
  326.      il      AL      Add #1 new blank lines (P*)
  327.      il1     al      Add one new blank line (*)
  328.      ind     sf      Scroll forward (up) one line
  329.      indn    SF      Scroll forward #1 lines (P)
  330.      invis   mk      Begin invisible text mode
  331.      ip      ip      Insert pad after character inserted (*)
  332.      iprog   iP      Path of program for initialization
  333.      is1     i1      Terminal initialization string
  334.      is2     is      Terminal initialization string
  335.      is3     i3      Terminal initialization string
  336.      kBEG    &9      Shifted beginning key
  337.      kCAN    &0      Shifted cancel key
  338.      kCMD    *1      Shifted command key
  339.      kCPY    *2      Shifted copy key
  340.      kCRT    *3      Shifted create key
  341.      kDC     *4      Shifted delete char key
  342.      kDL     *5      Shifted delete line key
  343.      kEND    *7      Shifted end key
  344.      kEOL    *8      Shifted clear line key
  345.      kEXT    *9      Shifted exit key
  346.      kFND    *0      Shifted find key
  347.      kHLP    #1      Shifted help key
  348.      kHOM    #2      Shifted home key
  349.      kIC     #3      Shifted input key
  350.      kLFT    #4      Shifted left arrow key
  351.      kMOV    %b      Shifted move key
  352.      kMSG    %a      Shifted message key
  353.      kNXT    %c      Shifted next key
  354.      kOPT    %d      Shifted options key
  355.      kPRT    %f      Shifted print key
  356.      kPRV    %e      Shifted prev key
  357.      kRDO    %g      Shifted redo key
  358.      kRES    %j      Shifted resume key
  359.      kRIT    %i      Shifted right arrow
  360.      kRPL    %h      Shifted replace key
  361.      kSAV    !1      Shifted save key
  362.      kSPD    !2      Shifted suspend key
  363.      kUND    !3      Shifted undo key
  364.      ka1     K1      Upper left of keypad
  365.      ka3     K3      Upper right of keypad
  366.      kb2     K2      Center of keypad
  367.      kbeg    @1      Beginning key
  368.      kbs     kb      Backspace key
  369.      kc1     K4      Lower left of keypad
  370.      kc3     K5      Lower right of keypad
  371.      kcan    @2      Cancel key
  372.      kcbt    kB      Back tab key
  373.      kclo    @3      Close key
  374.      kclr    kC      Clear screen or erase key
  375.      kcmd    @4      Command key
  376.      kcpy    @5      Copy key
  377.      kcrt    @6      Create key
  378.      kctab   kt      Clear tab key
  379.      kcub1   kl      Left arrow key
  380.      kcud1   kd      Down arrow key
  381.      kcuf1   kr      Right arrow key
  382.      kcuu1   ku      Up arrow key
  383.      kdch1   kD      Delete character key
  384.      kdl1    kL      Delete line key
  385.      ked     kS      Clear to end of screen key
  386.      kel     kE      Clear to end of line key
  387.      kend    @7      End key
  388.      kent    @8      Enter/send key (unreliable)
  389.      kext    @9      Exit key
  390.      kf0     k0      Function key f0
  391.      kf1     k1      Function key f1
  392.      kf10    k;      Function key f10
  393.      kf11    F1      Function key f11
  394.      kf12    F2      Function key f12
  395.      kf13    F3      Function key f13
  396.      kf14    F4      Function key f14
  397.      kf15    F5      Function key f15
  398.      kf16    F6      Function key f16
  399.      kf17    F7      Function key f17
  400.      kf18    F8      Function key f18
  401.      kf19    F9      Function key f19
  402.      kf2     k2      Function key f2
  403.      kf20    FA      Function key f20
  404.      kf21    FB      Function key f21
  405.      kf22    FC      Function key f22
  406.      kf23    FD      Function key f23
  407.      kf24    FE      Function key f24
  408.      kf25    FF      Function key f25
  409.      kf26    FG      Function key f26
  410.      kf27    FH      Function key f27
  411.      kf28    FI      Function key f28
  412.      kf29    FJ      Function key f29
  413.      kf3     k3      Function key f3
  414.      kf30    FK      Function key f30
  415.      kf31    FL      Function key f31
  416.      kf32    FM      Function key f32
  417.      kf33    FN      Function key f13
  418.      kf34    FO      Function key f34
  419.      kf35    FP      Function key f35
  420.      kf36    FQ      Function key f36
  421.      kf37    FR      Function key f37
  422.      kf38    FS      Function key f38
  423.      kf39    FT      Function key f39
  424.      kf4     k4      Function key f4
  425.      kf40    FU      Function key f40
  426.      kf41    FV      Function key f41
  427.      kf42    FW      Function key f42
  428.      kf43    FX      Function key f43
  429.      kf44    FY      Function key f44
  430.      kf45    FZ      Function key f45
  431.      kf46    Fa      Function key f46
  432.      kf47    Fb      Function key f47
  433.      kf48    Fc      Function key f48
  434.      kf49    Fd      Function key f49
  435.      kf5     k5      Function key f5
  436.      kf50    Fe      Function key f50
  437.      kf51    Ff      Function key f51
  438.      kf52    Fg      Function key f52
  439.      kf53    Fh      Function key f53
  440.      kf54    Fi      Function key f54
  441.      kf55    Fj      Function key f55
  442.      kf56    Fk      Function key f56
  443.      kf57    Fl      Function key f57
  444.      kf58    Fm      Function key f58
  445.      kf59    Fn      Function key f59
  446.      kf6     k6      Function key f6
  447.      kf60    Fo      Function key f60
  448.      kf61    Fp      Function key f61
  449.      kf62    Fq      Function key f62
  450.      kf63    Fr      Function key f63
  451.      kf7     k7      Function key f7
  452.      kf8     k8      Function key f8
  453.      kf9     k9      Function key f9
  454.      kfnd    @0      Find key
  455.      khlp    %1      Help key
  456.      khome   kh      Home key
  457.      khts    kT      Set tab key
  458.      kich1   kI      Ins char/enter ins mode key
  459.      kil1    kA      Insert line key
  460.      kind    kF      Scroll forward/down key
  461.      kll     kH      Home down key
  462.      kmov    %4      Move key
  463.      kmrk    %2      Mark key
  464.      kmsg    %3      Message key
  465.      knp     kN      Next page key
  466.      knxt    %5      Next object key
  467.      kopn    %6      Open key
  468.      kopt    %7      Options key
  469.      kpp     kP      Previous page key
  470.      kprt    %9      Print or copy key
  471.      kprv    %8      Previous object key
  472.      krdo    %0      Redo key
  473.      kref    &1      Reference key
  474.      kres    &5      Resume key
  475.      krfr    &2      Refresh key
  476.      kri     kR      Scroll backward/up key
  477.      krmir   kM      `rmir' or `smir' in insert mode
  478.      krpl    &3      Replace key
  479.      krst    &4      Restart key
  480.      ksav    &6      Save key
  481.      kslt    *6      Select key
  482.      kspd    &7      Suspend key
  483.      ktbc    ka      Clear all tabs key
  484.      kund    &8      Undo key
  485.      lf0     l0      Label on function key f0 if not `f0'
  486.      lf1     l1      Label on function key f1 if not `f1'
  487.      lf10    la      Label on function key f10 if not `f10'
  488.      lf2     l2      Label on function key f2 if not `f2'
  489.      lf3     l3      Label on function key f3 if not `f3'
  490.      lf4     l4      Label on function key f4 if not `f4'
  491.      lf5     l5      Label on function key f5 if not `f5'
  492.      lf6     l6      Label on function key f6 if not `f6'
  493.      lf7     l7      Label on function key f7 if not `f7'
  494.      lf8     l8      Label on function key f8 if not `f8'
  495.      lf9     l9      Label on function key f9 if not `f9'
  496.      ll      ll      Go to last line, first column (if no `cup')
  497.      mc0     ps      Print screen contents
  498.      mc4     pf      Turn printer off
  499.      mc5     po      Turn printer on
  500.      mc5p    pO      Turn printer on for #1 bytes (P)
  501.      mgc     MC      Clear left and right soft margins
  502.      mrcup   CM      Move cursor to row #1, column #2 of memory (P)
  503.      nel     nw      Newline (like cr followed by lf)
  504.      pad     pc      Pad character (rather than nul)
  505.      pfkey   pk      Program function key #1 to type string #2 (P)
  506.      pfloc   pl      Program function key #1 to execute string #2 (P)
  507.      pfx     px      Program function key #1 to transmit string #2 (P)
  508.      pln     pn      Program label #1 to show string #2 (P)
  509.      prot    mp      Begin protected mode
  510.      rc      rc      Restore cursor to position of last `sc'
  511.      rep     rp      Repeat character #1, #2 times (P*)
  512.      rev     mr      Begin reverse video mode
  513.      rf      rf      Name of file containing reset string
  514.      rfi     RF      Send next input character (for ptys)
  515.      ri      sr      Scroll backward (down) one line
  516.      rin     SR      Scroll backward #1 lines (P)
  517.      rmacs   ae      End alternate character set
  518.      rmam    RA      Turn off automatic margins
  519.      rmcup   te      String to end programs that use `cup'
  520.      rmdc    ed      End delete mode
  521.      rmir    ei      End insert mode
  522.      rmkx    ke      End keypad transmit mode
  523.      rmln    LF      Turn off soft labels
  524.      rmm     mo      End meta mode
  525.      rmp     rP      Like `ip' but when in replace mode
  526.      rmso    se      End standout mode
  527.      rmul    ue      End underscore mode
  528.      rmxon   RX      Turn off xon/xoff handshaking
  529.      rs1     r1      Reset terminal to sane modes
  530.      rs2     r2      Reset terminal to sane modes
  531.      rs3     r3      Reset terminal to sane modes
  532.      sc      sc      Save cursor position
  533.      sgr     sa      Define video attributes #1 through #9 (P)
  534.      sgr0    me      Turn off all attributes
  535.      smacs   as      Begin alternate character set
  536.      smam    SA      Turn on automatic margins
  537.      smcup   ti      String to begin programs that use `cup'
  538.      smdc    dm      Begin delete mode
  539.      smgl    ML      Set soft left margin to #1 (P)
  540.      smgr    MR      Set soft right margin to #1 (P)
  541.      smir    im      Begin insert mode
  542.      smkx    ks      Begin keypad transmit mode
  543.      smln    LO      Turn on soft labels
  544.      smm     mm      Begin meta mode (8th bit set)
  545.      smso    so      Begin standout mode
  546.      smul    us      Begin underscore mode
  547.      smxon   SX      Turn on xon/xoff handshaking
  548.      tbc     ct      Clear all tab stops
  549.      tsl     ts      Go to status line, column #1 (P)
  550.      uc      uc      Underscore one character and move past it
  551.      vpa     cv      Move cursor to row #1 (P)
  552.      wind    wi      Set window to lines #1-#2, columns #3-#4 (P)
  553.      xoffc   XF      xoff character
  554.      xonc    XN      xon character
  555.  
  556. 
  557. File: tput.info, Node: Error Messages, Next: Notes, Prev: Capabilities, Up: Top
  558.  
  559. Error Messages
  560. ==============
  561.  
  562. `tput' displays various error messages if problems occur.  In addition,
  563. it exits with one of the following status values:
  564.  
  565. 0
  566.      Normal status; the given capability is present.
  567.  
  568. 1
  569.      The given Boolean or string capability is not present.
  570.  
  571. 2
  572.      Usage error; `tput' was given invalid arguments.
  573.  
  574. 3
  575.      The terminal type given (either in the `TERM' environment variable
  576.      or by the `-T' switch) is unknown, or the termcap database can not
  577.      be read.
  578.  
  579. 4
  580.      The given capability is unknown.
  581.  
  582. 
  583. File: tput.info, Node: Notes, Prev: Error Messages, Up: Top
  584.  
  585. Notes
  586. =====
  587.  
  588. Terminfo is a database that is similar to termcap but which has
  589. different capability names and is stored in a different format.  The GNU
  590. `tput' command takes a terminfo name as an argument to make it
  591. compatible with the Unix System V `tput' command; there is no equivalent
  592. command, using termcap, in Berkeley Unix.
  593.  
  594.  
  595. Bugs
  596. ----
  597.  
  598. The `longname', `init', and `reset' options of the System V `tput'
  599. command are not implemented; however, the `tset' command can perform the
  600. latter two functions.
  601.  
  602.  
  603. Author
  604. ------
  605.  
  606. David MacKenzie wrote the GNU `tput' command.
  607.  
  608.