Commit | Line | Data |
---|---|---|
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 | 21 | tput \- terminal capability interface |
bcb8c651 | 22 | .SH SYNOPSIS |
eee80001 KB |
23 | .ft B |
24 | tput [ -T term ] attribute | |
25 | .ft R | |
bcb8c651 | 26 | .SH DESCRIPTION |
eee80001 KB |
27 | .I Tput |
28 | makes terminal-dependent information available to users or shell | |
29 | applications. | |
30 | The options are as follows: | |
31 | .TP | |
32 | \-T | |
33 | The terminal name as specified in the | |
34 | .I termcap | |
35 | database, for example, ``vt100'' or ``xterm''. | |
36 | If not specified, | |
37 | .I tput | |
38 | retrieves the ``TERM'' variable from the environment. | |
39 | .PP | |
d5d6bc1b KB |
40 | .I Tput |
41 | outputs a string if the | |
42 | .I attribute | |
43 | is of type string; a number if it is of type integer. | |
44 | Otherwise, | |
45 | .I tput | |
46 | exits 0 if the terminal has the capability and 1 if it does not, | |
47 | without further action. | |
48 | .PP | |
eee80001 KB |
49 | The following special attributes are available: |
50 | .TP | |
51 | clear | |
52 | .br | |
53 | Clear the screen (the | |
54 | .I termcap | |
55 | ``cl'' sequence). | |
56 | .TP | |
57 | init | |
58 | .br | |
59 | Initialize the terminal (the | |
60 | .I termcap | |
61 | ``is'' sequence). | |
62 | .TP | |
d5d6bc1b KB |
63 | longname |
64 | Print the descriptive name of the user's terminal type. | |
65 | .TP | |
eee80001 KB |
66 | reset |
67 | .br | |
68 | Reset the terminal (the | |
69 | .I termcap | |
70 | ``rs'' sequence). | |
d5d6bc1b KB |
71 | .SH DIAGNOSTICS |
72 | The exit value of | |
73 | .I tput | |
74 | is based on the last attribute specified. | |
75 | If the attribute is of type string or of type integer, | |
76 | .I tput | |
77 | exits 0 if the attribute is defined for this terminal type and 1 | |
78 | if it is not. | |
79 | If the attribute is of type boolean, | |
80 | .I tput | |
81 | exits 0 if the terminal has this attribute, and 1 if it does not. | |
82 | .I Tput | |
83 | exits 2 if any error occurred. | |
eee80001 KB |
84 | .SH "SEE ALSO" |
85 | termcap(3), termcap(5) | |
86 | .SH BUGS | |
87 | .I Tput | |
d5d6bc1b | 88 | can't really distinguish between different types of attributes. |
eee80001 | 89 | This is due to the limited interface in the current version of |
d5d6bc1b KB |
90 | .IR termcap (3), |
91 | and will be fixed in the near future. |