cleanup, get padding and archive creation right
[unix-history] / usr / src / usr.bin / tput / tput.1
CommitLineData
eee80001
KB
1.\" Copyright (c) 1989 The Regents of the University of California.
2.\" All rights reserved.
bcb8c651 3.\"
eee80001
KB
4.\" Redistribution and use in source and binary forms are permitted
5.\" provided that the above copyright notice and this paragraph are
6.\" duplicated in all such forms and that any documentation,
7.\" advertising materials, and other materials related to such
8.\" distribution and use acknowledge that the software was developed
9.\" by the University of California, Berkeley. The name of the
10.\" University may not be used to endorse or promote products derived
11.\" from this software without specific prior written permission.
12.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
13.\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
14.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
bcb8c651 15.\"
daacd5f0 16.\" @(#)tput.1 6.4 (Berkeley) %G%
eee80001
KB
17.\"
18.TH TPUT 1 ""
19.UC 7
bcb8c651 20.SH NAME
eee80001 21tput \- terminal capability interface
bcb8c651 22.SH SYNOPSIS
eee80001
KB
23.ft B
24tput [ -T term ] attribute
25.ft R
bcb8c651 26.SH DESCRIPTION
eee80001
KB
27.I Tput
28makes terminal-dependent information available to users or shell
29applications.
30The options are as follows:
31.TP
32\-T
33The terminal name as specified in the
34.I termcap
35database, for example, ``vt100'' or ``xterm''.
36If not specified,
37.I tput
38retrieves the ``TERM'' variable from the environment.
39.PP
d5d6bc1b
KB
40.I Tput
41outputs a string if the
42.I attribute
43is of type string; a number if it is of type integer.
44Otherwise,
45.I tput
46exits 0 if the terminal has the capability and 1 if it does not,
47without further action.
48.PP
eee80001
KB
49The following special attributes are available:
50.TP
51clear
52.br
53Clear the screen (the
54.I termcap
55``cl'' sequence).
56.TP
57init
58.br
59Initialize the terminal (the
60.I termcap
61``is'' sequence).
62.TP
d5d6bc1b
KB
63longname
64Print the descriptive name of the user's terminal type.
65.TP
eee80001
KB
66reset
67.br
68Reset the terminal (the
69.I termcap
70``rs'' sequence).
d5d6bc1b
KB
71.SH DIAGNOSTICS
72The exit value of
73.I tput
74is based on the last attribute specified.
75If the attribute is of type string or of type integer,
76.I tput
77exits 0 if the attribute is defined for this terminal type and 1
78if it is not.
79If the attribute is of type boolean,
80.I tput
81exits 0 if the terminal has this attribute, and 1 if it does not.
82.I Tput
83exits 2 if any error occurred.
eee80001
KB
84.SH "SEE ALSO"
85termcap(3), termcap(5)
86.SH BUGS
87.I Tput
d5d6bc1b 88can't really distinguish between different types of attributes.
eee80001 89This is due to the limited interface in the current version of
d5d6bc1b
KB
90.IR termcap (3),
91and will be fixed in the near future.