4.3BSD-Reno/src/usr.bin/tput/tput.1

Compare this file to the similar file:
Show the results in this format:

.\" Copyright (c) 1989, 1990 The Regents of the University of California.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms are permitted provided
.\" that: (1) source distributions retain this entire copyright notice and
.\" comment, and (2) distributions including binaries display the following
.\" acknowledgement:  ``This product includes software developed by the
.\" University of California, Berkeley and its contributors'' in the
.\" documentation or other materials provided with the distribution and in
.\" all advertising materials mentioning features or use of this software.
.\" Neither the name of the University nor the names of its contributors may
.\" be used to endorse or promote products derived from this software without
.\" specific prior written permission.
.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
.\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
.\"
.\"     @(#)tput.1	6.4 (Berkeley) 6/24/90
.\"
.TH TPUT 1 "%Q"
.UC 7
.SH NAME
tput \- terminal capability interface
.SH SYNOPSIS
.ft B
tput [ -T term ] attribute
.ft R
.SH DESCRIPTION
.I Tput
makes terminal-dependent information available to users or shell
applications.
The options are as follows:
.TP
\-T
The terminal name as specified in the
.I termcap
database, for example, ``vt100'' or ``xterm''.
If not specified,
.I tput
retrieves the ``TERM'' variable from the environment.
.PP
.I Tput
outputs a string if the
.I attribute
is of type string; a number if it is of type integer.
Otherwise,
.I 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:
.TP
clear
.br
Clear the screen (the
.I termcap
``cl'' sequence).
.TP
init
.br
Initialize the terminal (the
.I termcap
``is'' sequence).
.TP
longname
Print the descriptive name of the user's terminal type.
.TP
reset
.br
Reset the terminal (the
.I termcap
``rs'' sequence).
.SH DIAGNOSTICS
The exit value of
.I tput
is based on the last attribute specified.
If the attribute is of type string or of type integer,
.I 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,
.I tput
exits 0 if the terminal has this attribute, and 1 if it does not.
.I Tput
exits 2 if any error occurred.
.SH "SEE ALSO"
termcap(3), termcap(5)
.SH BUGS
.I Tput
can't really distinguish between different types of attributes.
This is due to the limited interface in the current version of
.IR termcap (3),
and will be fixed in the near future.