[BACK]Return to tput.1 CVS log [TXT][DIR] Up to [local] / src / usr.bin / tput

Annotation of src/usr.bin/tput/tput.1, Revision 1.6

1.6     ! aaron       1: .\"    $OpenBSD: tput.1,v 1.5 1999/03/06 20:27:42 millert Exp $
1.1       deraadt     2: .\"    $NetBSD: tput.1,v 1.4 1994/12/07 08:49:10 jtc Exp $
                      3: .\"
                      4: .\" Copyright (c) 1989, 1990, 1993
                      5: .\"    The Regents of the University of California.  All rights reserved.
                      6: .\"
                      7: .\" Redistribution and use in source and binary forms, with or without
                      8: .\" modification, are permitted provided that the following conditions
                      9: .\" are met:
                     10: .\" 1. Redistributions of source code must retain the above copyright
                     11: .\"    notice, this list of conditions and the following disclaimer.
                     12: .\" 2. Redistributions in binary form must reproduce the above copyright
                     13: .\"    notice, this list of conditions and the following disclaimer in the
                     14: .\"    documentation and/or other materials provided with the distribution.
                     15: .\" 3. All advertising materials mentioning features or use of this software
                     16: .\"    must display the following acknowledgement:
                     17: .\"    This product includes software developed by the University of
                     18: .\"    California, Berkeley and its contributors.
                     19: .\" 4. Neither the name of the University nor the names of its contributors
                     20: .\"    may be used to endorse or promote products derived from this software
                     21: .\"    without specific prior written permission.
                     22: .\"
                     23: .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
                     24: .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
                     25: .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
                     26: .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
                     27: .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
                     28: .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
                     29: .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
                     30: .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
                     31: .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
                     32: .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
                     33: .\" SUCH DAMAGE.
                     34: .\"
                     35: .\"     @(#)tput.1     8.2 (Berkeley) 3/19/94
                     36: .\"
1.5       millert    37: .Dd March 19, 1994
1.1       deraadt    38: .Dt TPUT 1
1.6     ! aaron      39: .Os
1.1       deraadt    40: .Sh NAME
                     41: .Nm tput
                     42: .Nd terminal capability interface
                     43: .Sh SYNOPSIS
                     44: .Nm tput
                     45: .Op Fl T Ar term
                     46: .Ar attribute
                     47: .Op Ar attribute-args
                     48: .Ar ...
                     49: .Sh DESCRIPTION
1.3       aaron      50: .Nm tput
1.1       deraadt    51: makes terminal-dependent information available to users or shell
                     52: applications.
                     53: The options are as follows:
                     54: .Bl -tag -width Ds
                     55: .It Fl T
                     56: The terminal name as specified in the
1.5       millert    57: .Xr termcap
1.1       deraadt    58: database, for example, ``vt100'' or ``xterm''.
                     59: If not specified,
                     60: .Nm tput
                     61: retrieves the
                     62: .Dq Ev TERM
                     63: variable from the environment.
                     64: .El
                     65: .Pp
1.3       aaron      66: .Nm tput
1.1       deraadt    67: outputs a string if the
                     68: .Ar attribute
                     69: is of type string; a number if it is of type integer.
                     70: Otherwise,
                     71: .Nm tput
                     72: exits 0 if the terminal has the capability and 1 if it does not,
                     73: without further action.
                     74: .Pp
                     75: If the
                     76: .Ar attribute
                     77: is of type string, and takes arguments (e.g. cursor movement,
1.5       millert    78: the termcap
                     79: .Dq cm
1.1       deraadt    80: sequence) the arguments are taken from the command line immediately
                     81: following the attribute.
                     82: .Pp
                     83: The following special attributes are available:
                     84: .Bl -tag -width Ar
                     85: .It clear
                     86: Clear the screen (the
1.5       millert    87: .Xr termcap
                     88: ``cl'' sequence).
1.1       deraadt    89: .It init
                     90: Initialize the terminal (the
1.5       millert    91: .Xr termcap
                     92: ``is'' sequence).
1.1       deraadt    93: .It longname
                     94: Print the descriptive name of the user's terminal type.
                     95: .It reset
                     96: Reset the terminal (the
1.5       millert    97: .Xr termcap
                     98: ``rs'' sequence).
1.1       deraadt    99: .Sh DIAGNOSTICS
                    100: The exit value of
                    101: .Nm tput
                    102: is based on the last attribute specified.
                    103: If the attribute is of type string or of type integer,
                    104: .Nm tput
                    105: exits 0 if the attribute is defined for this terminal type and 1
                    106: if it is not.
                    107: If the attribute is of type boolean,
                    108: .Nm tput
                    109: exits 0 if the terminal has this attribute, and 1 if it does not.
1.3       aaron     110: .Nm tput
1.1       deraadt   111: exits 2 if any error occurred.
                    112: .Sh EXAMPLES
1.5       millert   113: .Bl -tag -width "tput cm 6 11 DC 6" -compact
                    114: .It Li "tput cl cm 5 10"
1.1       deraadt   115: clear the screen and goto line 5 column 10
                    116: .Pp
1.5       millert   117: .It Li "tput cm 6 11 DC 6"
1.1       deraadt   118: goto line 6 column 11 and delete 6 characters
                    119: .Sh SEE ALSO
1.5       millert   120: .Xr termcap 3 ,
                    121: .Xr termcap 5
1.1       deraadt   122: .Sh BUGS
1.3       aaron     123: .Nm tput
1.1       deraadt   124: can't really distinguish between different types of attributes.
                    125: .Sh HISTORY
                    126: The
                    127: .Nm
1.3       aaron     128: command appeared in
1.1       deraadt   129: .Bx 4.4 .