summaryrefslogtreecommitdiff
path: root/static/v10/man1/tset.1
blob: 37d670a0f9f7281915f795c4bd7cffc2138761b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
.TH TSET 1
.CT 1 comm_term
.SH NAME
tset \- set terminal modes
.SH SYNOPSIS
.B tset
[
.I options
]
[
.B -m
.RB test : type
...
]
[
.I type
]
.SH DESCRIPTION
.I Tset
conditionally
sets erase and kill characters, tabs, delays, etc.
for terminals.
It is typically used in startup profiles; see
.IR sh (1).
In default of a specified terminal
.I type
(listed in the file
.FR /etc/termcap )
the type is taken from the environment variable
.LR TERM .
Option
.B -m
determines the type based on source and baud rate:
.IP
.B -m
.RI [\fB> baud ]\fB: type
.LP
No sources are distinguished at present.
The test 
.L >
may be replaced by 
.LR < ,
.LR = ,
or 
.L @
(same as 
.LR = ).
The test may be preceded by 
.L !
for negation.
A
.I type
may be preceded by 
.L ?
to cause
.I tset
to query whether the guess is right.
Tests are performed left-to-right until one is satisfied.
A final default
.I type
prevails when all tests fail.
Thus
.IP
.L
tset -m  \'>1200:5620\'  \'?hp\'
.LP
assumes the terminal is a 5620 if the line speed exceeds 1200 baud.
Otherwise it assumes an hp terminal but asks for confirmation,
giving you a chance to name another type.
.PP
The
.B -s
option causes tset to place on the standard output shell commands
for setting the environment variables
.L TERM
and
.LR TERMCAP .
Use this feature thus:
.IP
.L
eval \`tset -s \fIoption ...\fR\`
.PP
On terminals that can backspace but not overstrike
and when the erase character is the default erase character
.RL ( #
on standard systems),
the erase character is changed to a Control-H
(backspace).
.PP
Other options are:
.TP
.BI -e " c"
set the erase character to
.I c,
or backspace if
.I c
is missing
.TP
.BI -k " c"
set the kill character similarly; use control-X if
.I c
is missing
.TP
.B -I
suppress outputting terminal initialization strings
.TP
.B -Q
suppress printing
`Erase set to' and `Kill set to' messages
.TP
.B -S
Outputs
.L TERM
and
.L TERMCAP
in the environment rather than in shell commands
.SH FILES
.TF /etc/termcap
.TP
.F /etc/ttytype
terminal id to type map database
.TP
.F /etc/termcap
terminal capability database
.SH SEE\ ALSO
.IR sh (1), 
.IR stty (1), 
.IR environ (5), 
.IR termcap (5)