'\"macro stdmacro
.if n .pH g1.tset @(#)tset	40.5 of 11/6/89
.nr X
.if \nX=0 .ds x} tset 1 "XENIX Compatibility Package" "\&"
.if \nX=1 .ds x} tset 1 "XENIX Compatibility Package"
.if \nX=2 .ds x} tset 1 "" "\&"
.if \nX=3 .ds x} tset "" "" "\&"
.TH \*(x}
.SH NAME
\f4tset\fP - provides information for setting terminal modes.
.SH SYNOPSIS
\f4tset\fP [\f2options\f1][\f2type\f1]
.SH DESCRIPTION
\f4tset\fP allows the user to set a terminal's \f4ERASE\fP and \f4KILL\fP
characters, and define the terminal's type and capabilities by creating
values for the \f4TERM\fP and \f4TERMCAP\fP environment variables.
If a \f2type\f1 is given with the -\f2s\f1 option, \f4tset\fP creates
information for a terminal of the specified type.  The type may be any 
type given in \f4/usr/share/lib/termcap\fP.  If the \f2type\f1 is not specified
with the -\f2s\f1 option, \f4tset\fP creates information for a terminal
of the type defined by the value of the environment variable, \f4TERM\fP
unless the -\f2h\f1 or -\f2m\f1 option is given.  If the \f4TERM\fP 
variable is undefined, \f4tset\fP looks in \f4/usr/share/lib/termcap\fP for the
appropriate information.  If these options are used, \f4tset\fP searches
the \f4/etc/ttytype\fP file for the terminal type corresponding to
the current serial port; it then creates information for a terminal
based on this type.  If the serial port is not found in \f4/etc/ttytype\fP,
the terminal type is set to dumb.
.P
\f4tset\fP displays the created information at the standard output.
The information is in a form that can be used to set the current
environment variables.  The exact form depends on the login shell
from which \f4tset\fP was invoked.  The examples below illustrate
how to use this information to change the variables.
.P
There are the following options
.TP 5
.SM "-e[\f4c\f1P]"
Sets the \f4erase\fP character to [\f2c\f1] on all terminals.  The
default setting is the \f4BACKSPACE\fP, or \f4CTRL-H\fP.
.TP
.SM -E[\f4c\fP]
Identical to the -\f4e\fP command except that it only operates on
terminals that can \f4BACKSPACE\fP
.TP
.SM "-k[\f4c\fP]"
Sets the \f4KILL\fP character to \f2c\f1, defaulting to \f4CTRL-U\fP.
.TP
.SM "-"
Prints the terminal type on the standard output.
.TP
.SM "\f4-s\fP"
Outputs the ``\f4setenv\fP'' commands [for \f4csh\fP()], or 
``\f4export\fP'' and assignment commands [for \f4sh\fP()].  The
type of commands are determined by the user's login shell.
.TP
.SM "\f4-S\fP"
Only outputs the strings to be placed in the environment variables.
.TP
.SM "\f4-r\fP"
Prints the terminal type on the diagnostic output.
.TP
.SM "\f4-Q\fP"
Suppresses the printing of the ``\f4Erase set to\fP'' and ``\f4Kill
set to\fP'' messages.
.TP
.SM "\f4-I\fP"
Suppresses printing of the terminal initialization strings.
.TP
\f4tset\fP is most useful when included in the \f4.login\fP [for 
\f4csh\fP()] or \f4.profile\fP [for \f4sh\fP()] file executed
automatically at login, with -\f4m\fP option is given, the
first correct mapping prevails.
.P
Examples 
.TP 3
.nf
\f4tset gt42\fP
\f4tset - mdialup\>300:adm3a-mdialup:dw2-Qr-e#\fP
\f4tset -mdial:ti733-mplug:\?hp2621-munknown:\?-e-k^U\fP
.fi
.P
To use the information created by the -\f4s\fP option for the 
Bourne shell, (\f4sh\fP), repeat these commands:
.TP 3
.nf
\f4tset -s...>/tmp/tset$$\fP
\f4/tmp/tset$$\fP
\f4rm/tmp/tset$$\fP
.fi
.P
To use the information create for \f4csh\fP, use:
.TP 3
\f4set noglob 
set term=(`tset-S...')
setenv TERM$term[1]
setenv TERMCAP"$term[2]"
unset term
unset noglob\fP
.SH FILES
.TP 30
"\f4/usr/share/lib/termcap\fP"
Terminal capability database.
.SH SEE ALSO
\f4stty\f1(1), \f4termcap\fP(1), \f4tty\fP(1).
