=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tput/tput.1,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- src/usr.bin/tput/tput.1 1999/06/29 19:39:40 1.7 +++ src/usr.bin/tput/tput.1 1999/08/18 13:02:31 1.8 @@ -1,4 +1,4 @@ -.\" $OpenBSD: tput.1,v 1.7 1999/06/29 19:39:40 millert Exp $ +.\" $OpenBSD: tput.1,v 1.8 1999/08/18 13:02:31 aaron Exp $ .\" $NetBSD: tput.1,v 1.4 1994/12/07 08:49:10 jtc Exp $ .\" .\" Copyright (c) 1989, 1990, 1993 @@ -50,35 +50,40 @@ .Op Fl T Ar term .Fl S .Sh DESCRIPTION -.Nm tput -makes terminal-dependent information available to users or shell +The +.Nm +utility makes terminal-dependent information available to users or shell applications. +.Pp The options are as follows: .Bl -tag -width Ds .It Fl T -The terminal name as specified in the +The terminal name as found in the .Xr terminfo -database, for example, ``vt100'' or ``xterm''. +database; for example, +.Dq vt100 +or +.Dq xterm . If not specified, -.Nm tput +.Nm retrieves the -.Dq Ev TERM +.Ev TERM variable from the environment. .It Fl S The .Ar attributes -are read from stdin instead of from the command line. +are read from stdin instead of the command line. .El .Pp -.Nm tput +.Nm outputs a string if the .Ar attribute -is of type string; a number if it is of type integer. +is of type string or a number if it is of type integer. If the .Ar attribute is of type boolean, -.Nm tput -exits 0 if the terminal has the capability and 1 if it +.Nm +exits 0 if the terminal has the capability or 1 if it does not. Each .Ar attribute should be a string defined in either @@ -88,7 +93,7 @@ .Pp If the .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 .Xr terminfo .Dq cup @@ -100,7 +105,8 @@ .It clear Clear the screen (the .Xr terminfo -``clear'' sequence). +.Dq clear +sequence). .It init Print the .Xr terminfo @@ -113,10 +119,11 @@ reset sequences). .Sh DIAGNOSTICS The exit value of -.Nm tput +.Nm is based on the last attribute specified. If the attribute is of type string or of type integer the exit value is as follows: +.Pp .Bl -tag -offset indent -width Ds -compact .It 0 The requested string was written successfully. @@ -131,8 +138,8 @@ .El .Pp If the attribute is of type boolean, -.Nm tput -exits with a value of 0 if the terminal has this attribute, and +.Nm +exits with a value of 0 if the terminal has this attribute or 1 if it does not. .Sh EXAMPLES .Bl -tag -width "tput cup 6 11 dch 6" -compact @@ -145,10 +152,10 @@ .Xr terminfo 3 , .Xr terminfo 5 .Sh BUGS -.Nm tput +.Nm can't really distinguish between different types of attributes. .Sh HISTORY The .Nm -command appeared in +utility appeared in .Bx 4.4 .