Sccsid @(#)stty.1b 1.3 (gritter) 7/15/04
Parts taken from stty(1), Unix 7th edition:
Copyright(C) Caldera International Inc. 2001-2002. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
Redistributions of source code and documentation must retain the
above copyright notice, this list of conditions and the following
disclaimer.
Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
All advertising materials mentioning features or use of this software
must display the following acknowledgement:
This product includes software developed or owned by Caldera
International, Inc.
Neither the name of Caldera International, Inc. nor the names of
other contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA
INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE
LIABLE FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Special option values recognized only if given as single argument are:
12 all Print the normal output followed by a control character table.
12 everything Same as -h .
12 speed Print the speed rate.
12 size Print the rows and columns of the terminal.
If either -g , speed or size are given, stty uses /dev/tty to get the terminal settings, otherwise, the standard output is used.
The option strings are selected from the following set; where an option is shown prefixed by `[-]', it can be negated as described in the text.
Control modes:
[-]parenb enable (disable) parity bits |
[-]parodd select odd (even) parity |
cs5 cs6 cs7 cs8 set character size |
[-]cstopb use two (one) stop bits per character |
[-]clocal line has (no) modem control |
[-]hupcl |
hang up (do not hang up) dataphone on last close |
[-]hup same as hupcl |
0 hang up phone line immediately |
50 75 110 134 150 200 300 600 1200 1800 2400 4800 9600 |
19200 38400 exta extb |
Set terminal baud rate to the number given, if possible |
(not all terminals support all rates). |
Input modes:
[-]ignbrk ignore (respect) break character |
[-]brkint (do not) send interrupt on break |
[-]ignpar (do not) ignore parity errors |
[-]parmrk (do not) mark parity errors |
[-]inpck enable (disable) parity checking |
[-]istrip |
(do not) strip characters to 7 bits |
[-]inlcr (do not) map NL to CR |
[-]igncr (do not) ignore CR |
[-]icrnl (do not) map CR to NL |
[-]iuclc (do not) map upper to lower case |
[-]ixon enable start/stop control |
[-]ixany any character (DC1 only) restarts output |
[-]decctlq same as -ixany |
[-]ixoff |
(do not) send start/stop characters |
when the input queue is nearly full |
[-]tandem same as ixoff |
[-]imaxbel |
(do not) ring the bell when running out of input buffers |
[-]iutf8 (do not) handle input as UTF-8 |
Output modes:
[-]opost enable (disable) output processing |
[-]olcuc (do not) map upper to lower case |
[-]onlcr (do not) map NL to CR |
[-]onocr (do not) ignore CR |
[-]onlret NL is (not) return |
[-]ofill (do not) use fill characters |
[-]ofdel fill character is DEL (NUL) |
cr0 cr1 cr2 cr3 |
select style of delay for carriage return (see termio(3)) |
nl0 nl1 nl2 nl3 select style of delay for linefeed |
tab0 tab1 tab2 tab3 |
select style of delay for tab |
ff0 ff1 select style of delay for form feed |
bs0 bs1 select style of delay for backspace |
vt0 bt1 select style of delay for vertical tab |
Local modes:
[-]isig |
enable (disable) intr, quit, and susp processing |
[-]icanon enable (disable) erase and kill processing |
[-]cbreak same as -icanon |
[-]xcase (no) canonical case presentation |
[-]echo (do not) echo every character typed |
[-]echoe (do not) echo erase character as `^H ^H' |
[-]crterase same as echoe |
[-]echok (do not) echo NL after kill character |
[-]lfkc same as echok |
[-]echonl (do not) echo NL regardless of echo |
[-]noflsh (do not) flush after intr, quit, and susp |
[-]tostop send SIGTTOU for background output |
[-]echoctl |
(no) visual representation of control characters |
[-]ctlecho same as echoctl |
[-]echoprt (do not) echo erased characters |
[-]prterase same as echoprt |
[-]echoke |
(do not) print `^H ^H' sequences at line erase |
[-]crtkill same as echoke |
[-]flusho output is (not) flushed |
[-]pendin (do not) retype pending input |
[-]iexten |
enable (disable) extended control characters |
Control characters:
intr c set intr character to c. |
quit c set quit character to c. |
erase c set erase character to c. |
kill c set kill character to c. |
eof c set eof character to c. |
eol c set eol character to c. |
eol2 c set eol2 character to c. |
swtch c set swtch character to c. |
start c set start character to c. |
stop c set stop character to c. |
susp c set susp character to c. |
dsusp c set dsusp character to c. |
rprnt c set rprnt character to c. |
flush c set flush character to c. |
werase c set werase character to c. |
lnext c set lnext character to c. |
A control character may be either given as a literal character, or as `^c' for ASCII control characters CTRL-c; the special values `^-' and `undef' disable the control function. Multibyte characters cannot be used as control characters; trying to do so will result in the control character set to the first byte of the multibyte character sequence, which has the undesired effect of applying the control function to more characters than the one supplied.
Combination modes et cetera:
[-]raw |
(no) raw mode input |
(i.\|e. no erase, kill, interrupt, quit, EOT; parity bit passed back) |
cooked same as -raw |
sane reset all values to defaults |
[-]cbreak |
make each character available to read(2) |
as received; no erase and kill |
(make characters available to read |
only when newline is received) |
[-]oddp allow (disallow) odd parity |
[-]evenp allow (disallow) even parity |
[-]nl |
accept only new-line to end lines |
(allow carriage return for new-line, |
and output CR-LF for carriage return or new-line) |
[-]lcase |
(do not) map upper case to lower case |
[-]LCASE |
same as lcase |
[-]tabs |
(do not) replace tabs by spaces when printing |
nul-fill use NUL to fill output |
del-fill use DEL to fill output |
[-]fill |
select NUL-filled output (disable output filling) |
ek |
reset erase and kill characters back to normal ^H and ^U |
[-]litout |
Unset (set) parenb, istrip, opost, |
and cs8 (cs7). |
[-]pass8 |
Unset (set) parenb, istrip, |
and cs8 (cs7). |
crt |
Set echoe and echoctl. |
If the speed is equal to or higher than 1200 baud, |
also set echoke. |
dec |
set all modes suitable for |
Digital Equipment Corporation terminals. |
tty33 |
set all modes suitable for the |
Teletype Corporation Model 33 terminal. |
tty37 |
set all modes suitable for the |
Teletype Corporation Model 37 terminal. |
vt05 |
set all modes suitable for Digital Equipment Corp. VT05 terminal |
tn300 |
set all modes suitable for a General Electric TermiNet 300 |
ti700 |
set all modes suitable for Texas Instruments 700 series terminal |
tek |
set all modes suitable for Tektronix 4014 terminal |
min |
minimal number of bytes for non-canonical input |
time timeout for non-canonical input |
rows |
set the height of the terminal in character cell units |
columns |
set the width of the terminal in character cell units |
cols same as columns |
ypixels |
set the height of the terminal in pixels |
xpixels |
set the width of the terminal in pixels |