.\" Copyright (c) 1989, 1990 The Regents of the University of California. .\" All rights reserved. .\" .\" %sccs.include.redist.man% .\" .\" @(#)tput.1 6.5 (Berkeley) 03/23/93 .\" .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 The following special attributes are available: .Bl -tag -width Ar .It Ar clear Clear the screen (the .Xr termcap ``cl'' sequence). .It Ar init Initialize the terminal (the .Xr termcap ``is'' sequence). .It Ar longname Print the descriptive name of the user's terminal type. .It Ar 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. This is due to the limited interface in the current version of .Xr termcap 3 , and will be fixed in the near future. .Sh HISTORY The .Nm command appears in .Bx 4.4 .