3BSD/usr/man/man1/tset.1

Compare this file to the similar file:
Show the results in this format:

.TH TSET 1 11/16/79 1
.UC
.SH NAME
tset \- set terminal modes
.SH SYNOPSIS
.B tset
[
.I options
] [
.I type
]
.SH DESCRIPTION
.I Tset
causes terminal dependent processing such as setting
erase and kill characters, setting or resetting delays.
It is driven by the
.I /etc/ttytype
and
.I /etc/termcap
files.
.PP
.I Tset
is most useful when included in the
.I \&.login
(for
.IR csh (1))
or
.I \&.profile
(for
.IR sh (1))
file executed automatically at login,
with
.B \-d
used to specify the terminal type you most frequently dial in on.
.PP
There are gobs of exciting options.
Most of them can be ignored most of the time.
The options are listed in approximate order of importance,
from the very important
to the hopelessly obscure.
.nr xx \w'\-d \fItype\fR  '
.TP \n(xxu
\fB\-d\fR \fItype\fR
If the terminal is a dialup
set the type to
.I type
instead.
This flag overrides the
.I type
parameter on the command line,
so
.br
	tset \-d adm3a hp2621
.br
sets the type to ``adm3a'' if you are on a dialup
and ``hp2621'' otherwise.
.TP
\fB\-p\fR \fItype\fR
Like \fB\-d\fR, but for ``plugboard'' ports.
.TP
\fB\-b\fR \fItype\fR
Like \fB\-d\fR, but for ``bussiplexor'' ports.
.TP
\fB\-a\fR \fItype\fR
Like \fB\-d\fR, but for \s-2ARPANET\s0 telnet connections.
.TP
.BI \-e x
Set the erase character to
.I x.
If
.I x
is omitted,
set the erase character to the erase character for the
terminal you are on
(usually control-H).
If this flag is omitted,
this processing will only happen
on terminals that can backspace
and not overstrike.
.TP
.BI \-k x
Sets the kill character to
.I x.
The default for
.I x
is control-X.
.TP
.B \-
Output the terminal type to the standard output.
If this is the only argument specified,
.I tset
does no other processing.
.TP
.B \-s
Output setenv commands to set the TERM and TERMCAP
variables.  (See below.)
.TP
.B \-h
Do not look at the environment.
.TP
.B \-r
Output the terminal type to the diagnostic output.
Useful for people who like to know
what kind of terminal they are on.
.TP
.B \-Q
Be quiet.
This supresses the output of the
``Erase set to'' and ``Kill set to'' messages.
.TP
.B \-I
Don't do tab initialization.
Useful when long startup strings are output
and the terminal is already initialized.
.TP
.BI \-E x
Like
.BR \-e ,
except this flag is ignored on terminals that
cannot backspace at all.
God help you if you have to use this flag;
it only exists because out there somewhere an
\s-2ASR\s0-33 may still exist.
.PP
The type of the terminal you are on
is divined from the environment
...(in version 7),
...or the /etc/htmp file
...(in version 6),
unless the
.I type
argument is given
or any of the
.B \-h,
.B \-d,
.B \-p,
.B \-a,
or
.B \-b
flags are given.
If any of these are set,
.I tset
looks in the
.I /etc/ttytype
file for a type based on the port
you are logged in on.
The
.I type
may be any type given in
.I /etc/termcap.
If any
.I type
begins with a question mark,
the user is asked if s/he really wants that type.
A null response means to use that type;
otherwise, another type can be entered which will be used instead.
(The question mark should be escaped with \e
to prevent filename expansion by the shell.)
In the
.B \-e,
.B \-E,
and
.B \-k
flags,
.I x
can be replaced with
.RI ``^ X \&''
where X is any character;
this
is equivalent to
.RI control- X .
.PP
The
.B \-s
option outputs ``setenv'' commands
(if your default shell is
.IR csh (1))
or ``export'' and assignment commands
(if your default shell is 
.IR sh (1))
it can be used as:
.br
	\`tset \-s ...\`
.br
[Actually, this is not possible because of a problem in the shells.
Instead, use:
.nf
	tset \-s ... > /tmp/tset$$
	source /tmp/tset$$
	rm /tmp/tset$$
.fi
(If using
.IR sh (1)
replace `source' by `.')]
..Currently,
...B \-s
..sets the variables TERM
..with the terminal type
..and TERMCAP with the actual line from the
...I /etc/termcap
..file;
..this makes
...I ex
..and other terminal-dependent programs start up faster.
.PP
For version 6 systems,
.I tset
gets the terminal type from the file
/etc/htmp
and updates it there.
A special
.B \-u
flag on version 6 systems suppresses any possible
updating of /etc/htmp.
.SH EXAMPLES
tset \-dti733 \-p \e?hp2621 \-e \-k^U
.br
\`tset \-dadm3a \-s \-e# \-r\`
.br
tset gt42
.SH FILES
.DT
/etc/htmp		Terminal type database (version 6 only)
.br
/etc/ttytype		Terminal id to type map database
.br
/etc/termcap	Terminal capability database
.SH AUTHOR
Eric P. Allman
.SH SEE\ ALSO
setenv(1), stty(1), ttytype(5), termcap(5)
.SH BUGS