Lines 42-63
Link Here
|
42 |
.Sh SYNOPSIS |
42 |
.Sh SYNOPSIS |
43 |
.Nm |
43 |
.Nm |
44 |
.Op Fl T Ar term |
44 |
.Op Fl T Ar term |
45 |
.Ar attribute ... |
45 |
.Op Ar attribute ... |
46 |
.Nm clear |
46 |
.Nm clear |
47 |
.Sh DESCRIPTION |
47 |
.Sh DESCRIPTION |
48 |
The |
48 |
The |
49 |
.Nm |
49 |
.Nm |
50 |
utility makes terminal-dependent information available to users or shell |
50 |
utility makes terminal-dependent information available to users or shell |
51 |
applications. |
51 |
applications. |
52 |
When invoked as the |
52 |
.Pp |
|
|
53 |
The |
53 |
.Nm clear |
54 |
.Nm clear |
54 |
utility, the screen will be cleared as if |
55 |
utility executes the |
55 |
.Dl tput clear |
56 |
.Dl tput clear |
56 |
had been executed. |
57 |
command, ignoring any arguments. |
57 |
The options to |
58 |
.Pp |
|
|
59 |
The only option to |
58 |
.Nm |
60 |
.Nm |
59 |
are as follows: |
61 |
is: |
60 |
.Bl -tag -width Ds |
62 |
.Bl -tag -width 2n |
61 |
.It Fl T |
63 |
.It Fl T |
62 |
The terminal name as specified in the |
64 |
The terminal name as specified in the |
63 |
.Xr termcap 5 |
65 |
.Xr termcap 5 |
Lines 69-75
Link Here
|
69 |
.Nm |
71 |
.Nm |
70 |
retrieves the |
72 |
retrieves the |
71 |
.Dq Ev TERM |
73 |
.Dq Ev TERM |
72 |
variable from the environment. |
74 |
variable from the environment unless that too is not specified, |
|
|
75 |
in which case an error message will be sent to standard error and |
76 |
the error status will be 2. |
73 |
.El |
77 |
.El |
74 |
.Pp |
78 |
.Pp |
75 |
The |
79 |
The |
Lines 87-114
Link Here
|
87 |
is of type string, and takes arguments (e.g.\& cursor movement, |
91 |
is of type string, and takes arguments (e.g.\& cursor movement, |
88 |
the termcap |
92 |
the termcap |
89 |
.Dq cm |
93 |
.Dq cm |
90 |
sequence) the arguments are taken from the command line immediately |
94 |
capability) the arguments are taken from the command line immediately |
91 |
following the attribute. |
95 |
following the attribute. |
92 |
.Pp |
96 |
.Pp |
93 |
The following special attributes are available: |
97 |
The following special attributes are available. |
|
|
98 |
The first three use the capabilities of the specified terminal, |
99 |
and only work if compatible with the utility's terminal. |
94 |
.Bl -tag -width Ar |
100 |
.Bl -tag -width Ar |
95 |
.It Cm clear |
101 |
.It Cm clear |
96 |
Clear the screen (the |
102 |
Clear the screen (the |
97 |
.Xr termcap 5 |
103 |
.Xr termcap 5 |
98 |
.Dq cl |
104 |
.Dq cl |
99 |
sequence). |
105 |
capability). |
100 |
.It Cm init |
106 |
.It Cm init |
101 |
Initialize the terminal (the |
107 |
Initialize the terminal (the |
102 |
.Xr termcap 5 |
108 |
.Xr termcap 5 |
103 |
.Dq is |
109 |
.Dq is |
104 |
sequence). |
110 |
capability). |
105 |
.It Cm longname |
|
|
106 |
Print the descriptive name of the user's terminal type. |
107 |
.It Cm reset |
111 |
.It Cm reset |
108 |
Reset the terminal (the |
112 |
Reset the terminal (the |
109 |
.Xr termcap 5 |
113 |
.Xr termcap 5 |
110 |
.Dq rs |
114 |
.Dq rs |
111 |
sequence). |
115 |
capability). |
|
|
116 |
.It Cm longname |
117 |
Print the descriptive name of the user's terminal type. |
118 |
.El |
119 |
.Sh ENVIRONMENT |
120 |
.Bl -tag -width ".Ev TERM" |
121 |
.It Ev TERM |
122 |
The terminal name, if set and |
123 |
.Fl T |
124 |
is not used. |
112 |
.El |
125 |
.El |
113 |
.Sh DIAGNOSTICS |
126 |
.Sh DIAGNOSTICS |
114 |
The exit status of |
127 |
The exit status of |
Lines 116-131
Link Here
|
116 |
is as follows: |
129 |
is as follows: |
117 |
.Bl -tag -width indent |
130 |
.Bl -tag -width indent |
118 |
.It 0 |
131 |
.It 0 |
119 |
If the last attribute |
132 |
If the last |
120 |
.Ar attribute |
133 |
.Ar attribute |
121 |
argument is of type string or integer, its value was successfully written |
134 |
is of type string or integer, its value was successfully written |
122 |
to standard output. |
135 |
to standard output. |
123 |
If the argument is of type boolean, the terminal has this attribute. |
136 |
If the |
|
|
137 |
.Ar attribute |
138 |
is of type boolean, the terminal does have the |
139 |
.Ar attribute . |
140 |
Otherwise, no |
141 |
.Ar attribute |
142 |
was specified. |
124 |
.It 1 |
143 |
.It 1 |
125 |
This terminal does not have the specified boolean |
144 |
If the last |
|
|
145 |
.Ar attribute |
146 |
is of type boolean, |
147 |
this terminal does not have the |
126 |
.Ar attribute . |
148 |
.Ar attribute . |
127 |
.It 2 |
149 |
.It 2 |
128 |
Usage error. |
150 |
Usage error. |
|
|
151 |
For example, see |
152 |
.Fl T |
153 |
description. |
129 |
.It 3 |
154 |
.It 3 |
130 |
No information is available about the specified terminal type. |
155 |
No information is available about the specified terminal type. |
131 |
.El |
156 |
.El |