[BACK]Return to tput.1 CVS log [TXT][DIR] Up to [local] / src / usr.bin / tput

Diff for /src/usr.bin/tput/tput.1 between version 1.6 and 1.7

version 1.6, 1999/06/05 01:21:44 version 1.7, 1999/06/29 19:39:40
Line 34 
Line 34 
 .\"  .\"
 .\"     @(#)tput.1      8.2 (Berkeley) 3/19/94  .\"     @(#)tput.1      8.2 (Berkeley) 3/19/94
 .\"  .\"
 .Dd March 19, 1994  .Dd June 29, 1999
 .Dt TPUT 1  .Dt TPUT 1
 .Os  .Os
 .Sh NAME  .Sh NAME
Line 46 
Line 46 
 .Ar attribute  .Ar attribute
 .Op Ar attribute-args  .Op Ar attribute-args
 .Ar ...  .Ar ...
   .Nm tput
   .Op Fl T Ar term
   .Fl S
 .Sh DESCRIPTION  .Sh DESCRIPTION
 .Nm tput  .Nm tput
 makes terminal-dependent information available to users or shell  makes terminal-dependent information available to users or shell
Line 54 
Line 57 
 .Bl -tag -width Ds  .Bl -tag -width Ds
 .It Fl T  .It Fl T
 The terminal name as specified in the  The terminal name as specified in the
 .Xr termcap  .Xr terminfo
 database, for example, ``vt100'' or ``xterm''.  database, for example, ``vt100'' or ``xterm''.
 If not specified,  If not specified,
 .Nm tput  .Nm tput
 retrieves the  retrieves the
 .Dq Ev TERM  .Dq Ev TERM
 variable from the environment.  variable from the environment.
   .It Fl S
   The
   .Ar attributes
   are read from stdin instead of from the command line.
 .El  .El
 .Pp  .Pp
 .Nm tput  .Nm tput
 outputs a string if the  outputs a string if the
 .Ar attribute  .Ar attribute
 is of type string; a number if it is of type integer.  is of type string; a number if it is of type integer.
 Otherwise,  If the
   .Ar attribute
   is of type boolean,
 .Nm tput  .Nm tput
 exits 0 if the terminal has the capability and 1 if it does not,  exits 0 if the terminal has the capability and 1 if it
 without further action.  does not.  Each
   .Ar attribute
   should be a string defined in either
   .Xr terminfo 5
   or
   .Xr termcap 5 .
 .Pp  .Pp
 If the  If the
 .Ar attribute  .Ar attribute
 is of type string, and takes arguments (e.g. cursor movement,  is of type string, and takes arguments (e.g. cursor movement,
 the termcap  the
 .Dq cm  .Xr terminfo
   .Dq cup
 sequence) the arguments are taken from the command line immediately  sequence) the arguments are taken from the command line immediately
 following the attribute.  following the attribute.
 .Pp  .Pp
Line 84 
Line 99 
 .Bl -tag -width Ar  .Bl -tag -width Ar
 .It clear  .It clear
 Clear the screen (the  Clear the screen (the
 .Xr termcap  .Xr terminfo
 ``cl'' sequence).  ``clear'' sequence).
 .It init  .It init
 Initialize the terminal (the  Print the
 .Xr termcap  .Xr terminfo
 ``is'' sequence).  initialization strings for the specified terminal.
 .It longname  .It longname
 Print the descriptive name of the user's terminal type.  Print the descriptive name of the user's terminal type.
 .It reset  .It reset
 Reset the terminal (the  Reset the terminal (using the
 .Xr termcap  .Xr terminfo
 ``rs'' sequence).  reset sequences).
 .Sh DIAGNOSTICS  .Sh DIAGNOSTICS
 The exit value of  The exit value of
 .Nm tput  .Nm tput
 is based on the last attribute specified.  is based on the last attribute specified.
 If the attribute is of type string or of type integer,  If the attribute is of type string or of type integer the exit
 .Nm tput  value is as follows:
 exits 0 if the attribute is defined for this terminal type and 1  .Bl -tag -offset indent -width Ds -compact
 if it is not.  .It 0
   The requested string was written successfully.
   .It 2
   Usage error.
   .It 3
   Unknown terminal type.
   .It 4
   Unknown attribute name.
   .It >4
   An error occurred.
   .El
   .Pp
 If the attribute is of type boolean,  If the attribute is of type boolean,
 .Nm tput  .Nm tput
 exits 0 if the terminal has this attribute, and 1 if it does not.  exits with a value of 0 if the terminal has this attribute, and
 .Nm tput  1 if it does not.
 exits 2 if any error occurred.  
 .Sh EXAMPLES  .Sh EXAMPLES
 .Bl -tag -width "tput cm 6 11 DC 6" -compact  .Bl -tag -width "tput cup 6 11 dch 6" -compact
 .It Li "tput cl cm 5 10"  .It Li "tput clear cup 5 10"
 clear the screen and goto line 5 column 10  clear the screen and goto line 5 column 10
 .Pp  .Pp
 .It Li "tput cm 6 11 DC 6"  .It Li "tput cup 6 11 dch 6"
 goto line 6 column 11 and delete 6 characters  goto line 6 column 11 and delete 6 characters
 .Sh SEE ALSO  .Sh SEE ALSO
 .Xr termcap 3 ,  .Xr terminfo 3 ,
 .Xr termcap 5  .Xr terminfo 5
 .Sh BUGS  .Sh BUGS
 .Nm tput  .Nm tput
 can't really distinguish between different types of attributes.  can't really distinguish between different types of attributes.

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7