.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
.SH DESCRIPTION
\&\fBTset\fR initializes terminals.
\fBTset\fR first determines the type of terminal that you are using.
.SH DESCRIPTION
\&\fBTset\fR initializes terminals.
\fBTset\fR first determines the type of terminal that you are using.
2. The value of the \fBTERM\fR environmental variable.
.PP
3. (BSD systems only.) The terminal type associated with the standard
2. The value of the \fBTERM\fR environmental variable.
.PP
3. (BSD systems only.) The terminal type associated with the standard
-error output device in the \fI/etc/ttys\fR file. (On Linux and
-System-V-like UNIXes, \fIgetty\fR does this job by setting
+error output device in the \fI/etc/ttys\fR file.
+(On System\-V-like UNIXes and systems using that convention,
+\fIgetty\fR does this job by setting
\fBTERM\fR according to the type passed to it by \fI/etc/inittab\fR.)
.PP
4. The default terminal type, ``unknown''.
.PP
\fBTERM\fR according to the type passed to it by \fI/etc/inittab\fR.)
.PP
4. The default terminal type, ``unknown''.
.PP
Finally, if the erase, interrupt and line kill characters have changed,
or are not set to their default values, their values are displayed to the
standard error output.
Finally, if the erase, interrupt and line kill characters have changed,
or are not set to their default values, their values are displayed to the
standard error output.
versus the other initialization.
If neither option is given, both are assumed.
.PP
versus the other initialization.
If neither option is given, both are assumed.
.PP
turns off cbreak and raw modes, turns on newline translation and
resets any unset special characters to their default values before
doing the terminal initialization described above. This is useful
turns off cbreak and raw modes, turns on newline translation and
resets any unset special characters to their default values before
doing the terminal initialization described above. This is useful
Print the sequence of shell commands to initialize the environment variable
\fBTERM\fR to the standard output.
See the section
.B SETTING THE ENVIRONMENT
for details.
.TP
Print the sequence of shell commands to initialize the environment variable
\fBTERM\fR to the standard output.
See the section
.B SETTING THE ENVIRONMENT
for details.
.TP
Resize the window to match the size deduced via \fBsetupterm\fP.
Normally this has no effect,
unless \fBsetupterm\fP is not able to detect the window size.
.PP
Resize the window to match the size deduced via \fBsetupterm\fP.
Normally this has no effect,
unless \fBsetupterm\fP is not able to detect the window size.
.PP
.
.SH SETTING THE ENVIRONMENT
It is often desirable to enter the terminal type and information about
the terminal's capabilities into the shell's environment.
.
.SH SETTING THE ENVIRONMENT
It is often desirable to enter the terminal type and information about
the terminal's capabilities into the shell's environment.
into the shell's environment are written to the standard output. If
the \fBSHELL\fR environmental variable ends in ``csh'', the commands
are for \fBcsh\fR, otherwise, they are for \fBsh\fR.
into the shell's environment are written to the standard output. If
the \fBSHELL\fR environmental variable ends in ``csh'', the commands
are for \fBcsh\fR, otherwise, they are for \fBsh\fR.
\fBnoglob\fR, leaving it unset. The following line in the \fB.login\fR
or \fB.profile\fR files will initialize the environment correctly:
.sp
\fBnoglob\fR, leaving it unset. The following line in the \fB.login\fR
or \fB.profile\fR files will initialize the environment correctly:
.sp
.
.SH TERMINAL TYPE MAPPING
When the terminal is not hardwired into the system (or the current
system information is incorrect) the terminal type derived from the
\fI/etc/ttys\fR file or the \fBTERM\fR environmental variable is often
something generic like \fBnetwork\fR, \fBdialup\fR, or \fBunknown\fR.
.
.SH TERMINAL TYPE MAPPING
When the terminal is not hardwired into the system (or the current
system information is incorrect) the terminal type derived from the
\fI/etc/ttys\fR file or the \fBTERM\fR environmental variable is often
something generic like \fBnetwork\fR, \fBdialup\fR, or \fBunknown\fR.
optional operator, an optional baud rate specification, an optional
colon (``:'') character and a terminal type. The port type is a
string (delimited by either the operator or the colon character). The
optional operator, an optional baud rate specification, an optional
colon (``:'') character and a terminal type. The port type is a
string (delimited by either the operator or the colon character). The
mappings are applied to the terminal type. If the port type and baud
rate match the mapping, the terminal type specified in the mapping
replaces the current type. If more than one mapping is specified, the
mappings are applied to the terminal type. If the port type and baud
rate match the mapping, the terminal type specified in the mapping
replaces the current type. If more than one mapping is specified, the
.PP
If no baud rate is specified, the terminal type will match any baud rate.
If no port type is specified, the terminal type will match any port type.
.PP
If no baud rate is specified, the terminal type will match any baud rate.
If no port type is specified, the terminal type will match any port type.
will cause any dialup port, regardless of baud rate, to match the terminal
type vt100, and any non-dialup port type to match the terminal type ?xterm.
Note, because of the leading question mark, the user will be
queried on a default port as to whether they are actually using an xterm
terminal.
.PP
will cause any dialup port, regardless of baud rate, to match the terminal
type vt100, and any non-dialup port type to match the terminal type ?xterm.
Note, because of the leading question mark, the user will be
queried on a default port as to whether they are actually using an xterm
terminal.
.PP
was lightly adapted from the 4.4BSD sources for a terminfo environment by Eric
S. Raymond <esr@snark.thyrsus.com>.
.SH COMPATIBILITY
was lightly adapted from the 4.4BSD sources for a terminfo environment by Eric
S. Raymond <esr@snark.thyrsus.com>.
.SH COMPATIBILITY
environments (under most modern UNIXes, \fB/etc/inittab\fR and \fIgetty\fR(1)
can set \fBTERM\fR appropriately for each dial-up line; this obviates what was
environments (under most modern UNIXes, \fB/etc/inittab\fR and \fIgetty\fR(1)
can set \fBTERM\fR appropriately for each dial-up line; this obviates what was
-The \fB-S\fR option of BSD tset no longer works; it prints an error message to stderr
-and dies. The \fB-s\fR option only sets \fBTERM\fR, not \fBTERMCAP\fP. Both these
+The \fB\-S\fR option of BSD tset no longer works; it prints an error message to stderr
+and dies. The \fB\-s\fR option only sets \fBTERM\fR, not \fBTERMCAP\fP. Both these
noisily rather than silently induce lossage).
.PP
There was an undocumented 4.4BSD feature that invoking tset via a link named
`TSET` (or via any other name beginning with an upper-case letter) set the
terminal to use upper-case only. This feature has been omitted.
.PP
noisily rather than silently induce lossage).
.PP
There was an undocumented 4.4BSD feature that invoking tset via a link named
`TSET` (or via any other name beginning with an upper-case letter) set the
terminal to use upper-case only. This feature has been omitted.
.PP
-The \fB-A\fR, \fB-E\fR, \fB-h\fR, \fB-u\fR and \fB-v\fR
-options were deleted from the \fBtset\fR
+The \fB\-A\fR, \fB\-E\fR, \fB\-h\fR, \fB\-u\fR and \fB\-v\fR
+options were deleted from the \fB@TSET@\fR
not documented or useful, but were retained as they appear to be in
widespread use. It is strongly recommended that any usage of these
not documented or useful, but were retained as they appear to be in
widespread use. It is strongly recommended that any usage of these
-three options be changed to use the \fB-m\fR option instead. The
--n option remains, but has no effect. The \fB-adnp\fR options are therefore
+three options be changed to use the \fB\-m\fR option instead. The
+\fB\-n\fP option remains, but has no effect. The \fB\-adnp\fR options are therefore
arguments, although it is strongly recommended that such usage be fixed to
explicitly specify the character.
.PP
arguments, although it is strongly recommended that such usage be fixed to
explicitly specify the character.
.PP
-As of 4.4BSD, executing \fBtset\fR as \fBreset\fR no longer implies the \fB-Q\fR
-option. Also, the interaction between the - option and the \fIterminal\fR
-argument in some historic implementations of \fBtset\fR has been removed.
+As of 4.4BSD, executing \fB@TSET@\fR as \fBreset\fR no longer implies the \fB\-Q\fR
+option. Also, the interaction between the \- option and the \fIterminal\fR
+argument in some historic implementations of \fB@TSET@\fR has been removed.
TERMCAP
may denote the location of a termcap database.
If it is not an absolute pathname, e.g., begins with a `/',
TERMCAP
may denote the location of a termcap database.
If it is not an absolute pathname, e.g., begins with a `/',