Sortix main manual
This manual documents Sortix main. You can instead view this document in the latest official manual.
NAME
tset, reset — terminal initializationSYNOPSIS
tset | [-IQrs] [-] [-e ch] [-i ch] [-k ch] [-m mapping] [terminal] |
reset | [-IQrs] [-] [-e ch] [-i ch] [-k ch] [-m mapping] [terminal] |
DESCRIPTION
tset initializes terminals. tset first determines the type of terminal that you are using. This determination is done as follows, using the first terminal type found.- The terminal argument specified on the command line.
- The value of the TERM environmental variable.
- The terminal type associated with the standard error output device in the /etc/ttys file.
- The default terminal type, “unknown”.
<LF>reset<LF>
” (the line-feed character is normally control-J) to get the terminal to work, as carriage-return may no longer work in the abnormal state. Also, the terminal will often not echo the command.- -
- The terminal type is displayed to the standard output, and the terminal is not initialized in any way.
- -e
- Set the erase character to ch.
- -I
- Do not send the terminal or tab initialization strings to the terminal.
- -i
- Set the interrupt character to ch.
- -k
- Set the line kill character to ch.
- -m
- Specify a mapping from a port type to a terminal. See below for more information.
- -Q
- Don't display any values for the erase, interrupt and line kill characters.
- -r
- Print the terminal type to the standard error output.
- -s
- Print the sequence of shell commands to initialize the environment variable TERM to the standard output. See the section below on setting the environment for details.
^H
” or “^h
”.SETTING THE ENVIRONMENT
It is often desirable to enter the terminal type and information about the terminal's capabilities into the shell's environment. This is done using the -s option.eval `tset -s options ... `
set noglob set term=(`tset -S options ...`) setenv TERM $term[1] unset term unset noglob
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 /etc/ttys file or the TERM environmental variable is often something generic like “network”, “dialup”, or “unknown”. When tset is used in a startup script (.profile for sh(1) users or .login for csh(1) users) it is often desirable to provide information about the type of terminal used on such ports. The purpose of the -m option is to “map” from some set of conditions to a terminal type, that is, to tell tset ``If I'm on this port at a particular speed, guess that I'm on that kind of terminal''.>
”, “<
”, “@
”, and “!
”; “>
” means greater than, “<
” means less than, “@
” means equal to and “!
” inverts the sense of the test. The baud rate is specified as a number and is compared with the speed of the standard error output (which should be the control terminal). The terminal type is a string.dialup>9600:vt100
”. The port type is “dialup
”, the operator is “>
”, the baud rate specification is “9600
”, and the terminal type is “vt100
”. The result of this mapping is to specify that if the terminal type is “dialup
”, and the baud rate is greater than 9600 baud, a terminal type of “vt100
” will be used.-m dialup:vt100 -m :?xterm
” 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.FILES
- /etc/ttys
- system port name to terminal type mapping database
- /usr/share/misc/terminfo
- terminal capability database