.\" Copyright (c) 1989, 1990, 1993 .\" The Regents of the University of California. All rights reserved. .\" .\" %sccs.include.redist.man% .\" .\" @(#)tput.1 8.2 (Berkeley) 03/19/94 .\" .Dd .Dt TPUT 1 .Os BSD 4.4 .Sh NAME .Nm tput .Nd terminal capability interface .Sh SYNOPSIS .Nm tput .Op Fl T Ar term .Ar attribute .Sh DESCRIPTION .Nm Tput makes terminal-dependent information available to users or shell applications. The options are as follows: .Bl -tag -width Ds .It Fl T The terminal name as specified in the .Xr termcap database, for example, ``vt100'' or ``xterm''. If not specified, .Nm tput retrieves the .Dq Ev TERM variable from the environment. .El .Pp .Nm Tput outputs a string if the .Ar attribute is of type string; a number if it is of type integer. Otherwise, .Nm tput exits 0 if the terminal has the capability and 1 if it does not, without further action. .Pp If the .Ar attribute is of type string, and takes arguments (e.g. cursor movement, the termcap .Dq cm sequence) the arguments are taken from the command line immediately following the attribute. .Pp The following special attributes are available: .Bl -tag -width Ar .It clear Clear the screen (the .Xr termcap ``cl'' sequence). .It init Initialize the terminal (the .Xr termcap ``is'' sequence). .It longname Print the descriptive name of the user's terminal type. .It reset Reset the terminal (the .Xr termcap ``rs'' sequence). .Sh DIAGNOSTICS The exit value of .Nm tput is based on the last attribute specified. If the attribute is of type string or of type integer, .Nm tput exits 0 if the attribute is defined for this terminal type and 1 if it is not. If the attribute is of type boolean, .Nm tput exits 0 if the terminal has this attribute, and 1 if it does not. .Nm Tput exits 2 if any error occurred. .Sh SEE ALSO .Xr termcap 3 , .Xr termcap 5 .Sh BUGS .Nm Tput can't really distinguish between different types of attributes. .Sh HISTORY The .Nm command appears in .Bx 4.4 .