1.\" Copyright (c) 1989, 1990, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" %sccs.include.redist.man% 5.\" 6.\" @(#)tput.1 8.1 (Berkeley) 06/06/93 7.\" 8.Dd 9.Dt TPUT 1 10.Os BSD 4.4 11.Sh NAME 12.Nm tput 13.Nd terminal capability interface 14.Sh SYNOPSIS 15.Nm tput 16.Op Fl T Ar term 17.Ar attribute 18.Sh DESCRIPTION 19.Nm Tput 20makes terminal-dependent information available to users or shell 21applications. 22The options are as follows: 23.Bl -tag -width Ds 24.It Fl T 25The terminal name as specified in the 26.Xr termcap 27database, for example, ``vt100'' or ``xterm''. 28If not specified, 29.Nm tput 30retrieves the 31.Dq Ev TERM 32variable from the environment. 33.El 34.Pp 35.Nm Tput 36outputs a string if the 37.Ar attribute 38is of type string; a number if it is of type integer. 39Otherwise, 40.Nm tput 41exits 0 if the terminal has the capability and 1 if it does not, 42without further action. 43.Pp 44The following special attributes are available: 45.Bl -tag -width Ar 46.It Ar clear 47Clear the screen (the 48.Xr termcap 49``cl'' sequence). 50.It Ar init 51Initialize the terminal (the 52.Xr termcap 53``is'' sequence). 54.It Ar longname 55Print the descriptive name of the user's terminal type. 56.It Ar reset 57Reset the terminal (the 58.Xr termcap 59``rs'' sequence). 60.Sh DIAGNOSTICS 61The exit value of 62.Nm tput 63is based on the last attribute specified. 64If the attribute is of type string or of type integer, 65.Nm tput 66exits 0 if the attribute is defined for this terminal type and 1 67if it is not. 68If the attribute is of type boolean, 69.Nm tput 70exits 0 if the terminal has this attribute, and 1 if it does not. 71.Nm Tput 72exits 2 if any error occurred. 73.Sh SEE ALSO 74.Xr termcap 3 , 75.Xr termcap 5 76.Sh BUGS 77.Nm Tput 78can't really distinguish between different types of attributes. 79This is due to the limited interface in the current version of 80.Xr termcap 3 , 81and will be fixed in the near future. 82.Sh HISTORY 83The 84.Nm 85command appears in 86.Bx 4.4 . 87