1*1999c518SAntoine Leca.\" $NetBSD: tput.1,v 1.16 2012/04/21 12:27:30 roy Exp $ 2*1999c518SAntoine Leca.\" 3*1999c518SAntoine Leca.\" Copyright (c) 1989, 1990, 1993 4*1999c518SAntoine Leca.\" The Regents of the University of California. All rights reserved. 5*1999c518SAntoine Leca.\" 6*1999c518SAntoine Leca.\" Redistribution and use in source and binary forms, with or without 7*1999c518SAntoine Leca.\" modification, are permitted provided that the following conditions 8*1999c518SAntoine Leca.\" are met: 9*1999c518SAntoine Leca.\" 1. Redistributions of source code must retain the above copyright 10*1999c518SAntoine Leca.\" notice, this list of conditions and the following disclaimer. 11*1999c518SAntoine Leca.\" 2. Redistributions in binary form must reproduce the above copyright 12*1999c518SAntoine Leca.\" notice, this list of conditions and the following disclaimer in the 13*1999c518SAntoine Leca.\" documentation and/or other materials provided with the distribution. 14*1999c518SAntoine Leca.\" 3. Neither the name of the University nor the names of its contributors 15*1999c518SAntoine Leca.\" may be used to endorse or promote products derived from this software 16*1999c518SAntoine Leca.\" without specific prior written permission. 17*1999c518SAntoine Leca.\" 18*1999c518SAntoine Leca.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 19*1999c518SAntoine Leca.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20*1999c518SAntoine Leca.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21*1999c518SAntoine Leca.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 22*1999c518SAntoine Leca.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23*1999c518SAntoine Leca.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24*1999c518SAntoine Leca.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25*1999c518SAntoine Leca.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26*1999c518SAntoine Leca.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27*1999c518SAntoine Leca.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28*1999c518SAntoine Leca.\" SUCH DAMAGE. 29*1999c518SAntoine Leca.\" 30*1999c518SAntoine Leca.\" @(#)tput.1 8.2 (Berkeley) 3/19/94 31*1999c518SAntoine Leca.\" 32*1999c518SAntoine Leca.Dd April 5, 2012 33*1999c518SAntoine Leca.Dt TPUT 1 34*1999c518SAntoine Leca.Os 35*1999c518SAntoine Leca.Sh NAME 36*1999c518SAntoine Leca.Nm tput , 37*1999c518SAntoine Leca.Nm clear 38*1999c518SAntoine Leca.Nd terminal capability interface 39*1999c518SAntoine Leca.Sh SYNOPSIS 40*1999c518SAntoine Leca.Nm 41*1999c518SAntoine Leca.Op Fl T Ar term 42*1999c518SAntoine Leca.Ar attribute 43*1999c518SAntoine Leca.Op Ar attribute-args 44*1999c518SAntoine Leca.Ar ... 45*1999c518SAntoine Leca.Sh DESCRIPTION 46*1999c518SAntoine Leca.Nm 47*1999c518SAntoine Lecamakes terminal-dependent information available to users or shell 48*1999c518SAntoine Lecaapplications. 49*1999c518SAntoine LecaThe options are as follows: 50*1999c518SAntoine Leca.Bl -tag -width Ds 51*1999c518SAntoine Leca.It Fl T 52*1999c518SAntoine LecaThe terminal name as specified in the 53*1999c518SAntoine Leca.Xr terminfo 5 54*1999c518SAntoine Lecadatabase, for example, 55*1999c518SAntoine Leca.Dq vt100 56*1999c518SAntoine Lecaor 57*1999c518SAntoine Leca.Dq xterm . 58*1999c518SAntoine LecaIf not specified, 59*1999c518SAntoine Leca.Nm 60*1999c518SAntoine Lecaretrieves the 61*1999c518SAntoine Leca.Dq Ev TERM 62*1999c518SAntoine Lecavariable from the environment. 63*1999c518SAntoine Leca.El 64*1999c518SAntoine Leca.Pp 65*1999c518SAntoine Leca.Nm 66*1999c518SAntoine Lecaoutputs a string if the 67*1999c518SAntoine Leca.Ar attribute 68*1999c518SAntoine Lecais of type string; a number if it is of type integer. 69*1999c518SAntoine LecaOtherwise, 70*1999c518SAntoine Leca.Nm 71*1999c518SAntoine Lecaexits 0 if the terminal has the capability and 1 if it does not, 72*1999c518SAntoine Lecawithout further action. 73*1999c518SAntoine Leca.Pp 74*1999c518SAntoine LecaIf the 75*1999c518SAntoine Leca.Ar attribute 76*1999c518SAntoine Lecais of type string, and takes arguments (e.g. cursor movement, 77*1999c518SAntoine Lecathe terminfo 78*1999c518SAntoine Leca.Dq cup 79*1999c518SAntoine Lecasequence) the arguments are taken from the command line immediately 80*1999c518SAntoine Lecafollowing the attribute. 81*1999c518SAntoine Leca.Pp 82*1999c518SAntoine LecaThe following special attributes are available: 83*1999c518SAntoine Leca.Bl -tag -width Ar 84*1999c518SAntoine Leca.It clear 85*1999c518SAntoine LecaClear the screen (the 86*1999c518SAntoine Leca.Xr terminfo 5 87*1999c518SAntoine Leca.Dq cl 88*1999c518SAntoine Lecasequence). 89*1999c518SAntoine Leca.It init 90*1999c518SAntoine LecaInitialize the terminal (the 91*1999c518SAntoine Leca.Xr terminfo 5 92*1999c518SAntoine Leca.Dq is2 93*1999c518SAntoine Lecasequence). 94*1999c518SAntoine Leca.It longname 95*1999c518SAntoine LecaPrint the descriptive name of the user's terminal type. 96*1999c518SAntoine Leca.It reset 97*1999c518SAntoine LecaReset the terminal (the 98*1999c518SAntoine Leca.Xr terminfo 5 99*1999c518SAntoine Leca.Dq rs1 , rs2 , rs3 100*1999c518SAntoine Lecaand 101*1999c518SAntoine Leca.Dq rf 102*1999c518SAntoine Lecasequence). 103*1999c518SAntoine Leca.El 104*1999c518SAntoine Leca.Sh EXIT STATUS 105*1999c518SAntoine LecaThe exit status of 106*1999c518SAntoine Leca.Nm 107*1999c518SAntoine Lecais based on the last attribute specified. 108*1999c518SAntoine LecaIf the attribute is of type string or of type integer, 109*1999c518SAntoine Leca.Nm 110*1999c518SAntoine Lecaexits 0 if the attribute is defined for this terminal type and 1 111*1999c518SAntoine Lecaif it is not. 112*1999c518SAntoine LecaIf the attribute is of type boolean, 113*1999c518SAntoine Leca.Nm 114*1999c518SAntoine Lecaexits 0 if the terminal has this attribute, and 1 if it does not. 115*1999c518SAntoine Leca.Nm 116*1999c518SAntoine Lecaexits 2 if any error occurred. 117*1999c518SAntoine Leca.Sh EXAMPLES 118*1999c518SAntoine Leca.Bl -tag -width "tput cm 6 11 DC 6" -compact 119*1999c518SAntoine Leca.It Li "tput cl cm 5 10" 120*1999c518SAntoine Lecaclear the screen and goto line 5 column 10 121*1999c518SAntoine Leca.Pp 122*1999c518SAntoine Leca.It Li "tput cm 6 11 DC 6" 123*1999c518SAntoine Lecagoto line 6 column 11 and delete 6 characters 124*1999c518SAntoine Leca.El 125*1999c518SAntoine Leca.Sh SEE ALSO 126*1999c518SAntoine Leca.Xr termcap 3 , 127*1999c518SAntoine Leca.Xr terminfo 3 , 128*1999c518SAntoine Leca.Xr terminfo 5 129*1999c518SAntoine Leca.Sh HISTORY 130*1999c518SAntoine LecaThe 131*1999c518SAntoine Leca.Nm 132*1999c518SAntoine Lecacommand appears in 133*1999c518SAntoine Leca.Bx 4.4 . 134*1999c518SAntoine Leca.Sh BUGS 135*1999c518SAntoine Leca.Nm 136*1999c518SAntoine Lecacan't really distinguish between different types of attributes. 137*1999c518SAntoine Leca.Pp 138*1999c518SAntoine LecaNot all terminfo entries contain the reset sequence, so using the init 139*1999c518SAntoine Lecasequence may be more useful. 140