-.TH TSET 1 "16 October 1982"
+.\" Copyright (c) 1980 Regents of the University of California.
+.\" All rights reserved. The Berkeley software License Agreement
+.\" specifies the terms and conditions for redistribution.
+.\"
+.\" @(#)tset.1 6.2 (Berkeley) 5/5/86
+.\"
+.TH TSET 1 "May 5, 1986"
.UC 4
-.\" @(#)tset.1 1.2
.SH NAME
tset \- terminal dependent initialization
.SH SYNOPSIS
[ident][test baudrate]:type ] \&... [ type ]
.sp 1
.B reset
-\&...
+[ options ] [
+.B \-m
+[ident][test baudrate]:type ] \&... [ type ]
.SH DESCRIPTION
.I Tset
sets up your terminal when you first log in to a UNIX system.
of terminal involved,
and then does necessary initializations and mode settings.
The type of terminal attached to each \s-2UNIX\s0 port is specified in the
-.I /etc/ttytype
+.IR /etc/ttys (5)
database.
Type names for terminals may be found in the
.IR termcap (5)
users) it is desirable to give information about the type of terminal
you will usually use on ports which are not hardwired.
These ports are identified in
-.I /etc/ttytype
+.I /etc/ttys
as
.I dialup
or
.BR \-m ,
is given on the command line
then that type is used;
-otherwise the identifier found in the
-.I /etc/ttytype
+otherwise the type found in the
+.I /etc/ttys
database will be taken to be the terminal type.
This should always be the case for hardwired ports.
.PP
.PP
With
.I csh
-it is convenient to make an alias in your .cshrc:
+it is preferable to use the following command in your .login file to
+initialize the TERM and TERMCAP environment variables at the same time.
+.IP
+eval \`tset -s \fIoptions...\fR\`
.PP
-.RS
-alias tset \'setenv TERM \`tset \- \e!*\`\'
-.RE
-Either of these aliases allow the command
-.RS
+It is also convenient to make an alias in your .cshrc:
+.IP
+alias tset \'eval \`tset \-s \e!*\`\'
+.PP
+This allows the command:
+.IP
tset 2621
-.RE
-to be invoked at any time from your login csh.
+.PP
+to be invoked at any time to set the terminal and environment.
.B "Note to Bourne Shell users:"
It is
.B not
is not specified.
The hat notation can also be used for this option.
.TP
+.B \-i\fIc
+is similar to
+.B \-e
+but for the interrupt character rather than the erase character;
+.I c
+defaults to ^C. The hat notation can also be used for this option.
+.TP
.B \-
The name of the terminal finally decided upon is output on the
standard output.
This is intended to be captured by the shell and placed in the
environment variable TERM.
.TP
+.B \-s
+Print the sequence of
+.I csh
+commands to initialize the environment variables TERM and TERMCAP based on
+the name of the terminal finally decided upon.
+.TP
.B \-n
On systems with the Berkeley 4BSD tty driver,
specifies that the new tty driver modes should be initialized for this terminal.
turn on newline translation, and restore special characters
to a sensible state before any terminal dependent processing is done.
Any special character that is found to be \s-2NULL\s0
-or ``\-1'' is reset to its default value.
+or ``\-1'' is reset to its default value. All arguments to
+.I tset
+may be used with reset.
.PP
This is most useful after a program dies leaving a terminal in a funny
state. You may have to type ``\s-2<LF>\s0reset\s-2<LF>\s0'' to get it to work
export TERM; TERM=\`tset \- 2621\`
.PP
You have an h19 at home which you dial up on, but your office terminal
-is hardwired and known in /etc/ttytype.
+is hardwired and known in /etc/ttys.
.IP
export TERM; TERM=\`tset \- \-m dialup:h19\`
.PP
.PP
All of the above entries will fall back on the terminal type
specified in
-.I /etc/ttytype
+.I /etc/ttys
if none of the conditions hold.
The following entry is appropriate if
you always dial up, always at the same baud rate,
export TERM; TERM=\`tset \- \?adm3a\`
.PP
If the file
-.I /etc/ttytype
+.I /etc/ttys
is not properly installed and you want to
key entirely on the baud rate, the following can be used:
.IP
over the ARPANET; in this case you are on an ALTO emulating a dm2500.
You also often log in on various hardwired ports, such as the console,
all of which are properly entered in
-.IR /etc/ttytype .
+.IR /etc/ttys .
You want your erase character set to control H,
your kill character set to control U,
and don't want
export TERM; TERM=\`tset \-e \-k^U \-Q \- \-m 'switch<=1200:concept100' \-m 'switch:?vt100' \-m dialup:concept100 \-m arpanet:dm2500\`
.SH FILES
.DT
-/etc/ttytype port name to terminal type mapping database
+/etc/ttys port name to terminal type mapping database
.br
/etc/termcap terminal capability database
.SH SEE\ ALSO
-csh(1), sh(1), stty(1), ttytype(5), termcap(5), environ(7)
-.SH AUTHORS
-Eric Allman
-.br
-David Wasley
-.br
-Mark Horton
+csh(1), sh(1), stty(1), ttys(5), termcap(5), environ(7)
.SH BUGS
.PP
The
program should do this stuff,
or a default shell alias should be made,
or a way to set the environment of the parent should exist.
+.PP
+This program can't intuit personal choices for erase, interrupt
+and line kill characters, so it leaves these set to the local system
+standards.
.ig
.SH NOTES
For compatibility with earlier versions of