Mon Dec 14 07:35:44 2009 UTC ()
Bump date for previous.


(wiz)
diff -r1.37 -r1.38 src/bin/stty/stty.1

cvs diff -r1.37 -r1.38 src/bin/stty/stty.1 (switch to unified diff)

--- src/bin/stty/stty.1 2009/12/14 02:34:52 1.37
+++ src/bin/stty/stty.1 2009/12/14 07:35:44 1.38
@@ -1,611 +1,611 @@ @@ -1,611 +1,611 @@
1.\" $NetBSD: stty.1,v 1.37 2009/12/14 02:34:52 dholland Exp $ 1.\" $NetBSD: stty.1,v 1.38 2009/12/14 07:35:44 wiz Exp $
2.\" 2.\"
3.\" Copyright (c) 1990, 1993, 1994 3.\" Copyright (c) 1990, 1993, 1994
4.\" The Regents of the University of California. All rights reserved. 4.\" The Regents of the University of California. All rights reserved.
5.\" 5.\"
6.\" This code is derived from software contributed to Berkeley by 6.\" This code is derived from software contributed to Berkeley by
7.\" the Institute of Electrical and Electronics Engineers, Inc. 7.\" the Institute of Electrical and Electronics Engineers, Inc.
8.\" 8.\"
9.\" Redistribution and use in source and binary forms, with or without 9.\" Redistribution and use in source and binary forms, with or without
10.\" modification, are permitted provided that the following conditions 10.\" modification, are permitted provided that the following conditions
11.\" are met: 11.\" are met:
12.\" 1. Redistributions of source code must retain the above copyright 12.\" 1. Redistributions of source code must retain the above copyright
13.\" notice, this list of conditions and the following disclaimer. 13.\" notice, this list of conditions and the following disclaimer.
14.\" 2. Redistributions in binary form must reproduce the above copyright 14.\" 2. Redistributions in binary form must reproduce the above copyright
15.\" notice, this list of conditions and the following disclaimer in the 15.\" notice, this list of conditions and the following disclaimer in the
16.\" documentation and/or other materials provided with the distribution. 16.\" documentation and/or other materials provided with the distribution.
17.\" 3. Neither the name of the University nor the names of its contributors 17.\" 3. Neither the name of the University nor the names of its contributors
18.\" may be used to endorse or promote products derived from this software 18.\" may be used to endorse or promote products derived from this software
19.\" without specific prior written permission. 19.\" without specific prior written permission.
20.\" 20.\"
21.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 21.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 24.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31.\" SUCH DAMAGE. 31.\" SUCH DAMAGE.
32.\" 32.\"
33.\" @(#)stty.1 8.5 (Berkeley) 6/1/94 33.\" @(#)stty.1 8.5 (Berkeley) 6/1/94
34.\" 34.\"
35.Dd June 24, 2007 35.Dd December 14, 2009
36.Dt STTY 1 36.Dt STTY 1
37.Os 37.Os
38.Sh NAME 38.Sh NAME
39.Nm stty 39.Nm stty
40.Nd set the options for a terminal device interface 40.Nd set the options for a terminal device interface
41.Sh SYNOPSIS 41.Sh SYNOPSIS
42.Nm 42.Nm
43.Op Fl a | Fl e | Fl g 43.Op Fl a | Fl e | Fl g
44.Op Fl f Ar file 44.Op Fl f Ar file
45.Op operands 45.Op operands
46.Sh DESCRIPTION 46.Sh DESCRIPTION
47The 47The
48.Nm 48.Nm
49utility sets or reports on terminal 49utility sets or reports on terminal
50characteristics for the device that is its standard input. 50characteristics for the device that is its standard input.
51If no options or operands are specified, it reports the settings of a subset 51If no options or operands are specified, it reports the settings of a subset
52of characteristics as well as additional ones if they differ from their 52of characteristics as well as additional ones if they differ from their
53default values. 53default values.
54Otherwise it modifies 54Otherwise it modifies
55the terminal state according to the specified arguments. 55the terminal state according to the specified arguments.
56Some combinations of arguments are mutually 56Some combinations of arguments are mutually
57exclusive on some terminal types. 57exclusive on some terminal types.
58.Pp 58.Pp
59The following options are available: 59The following options are available:
60.Bl -tag -width Ds 60.Bl -tag -width Ds
61.It Fl a 61.It Fl a
62Display all the current settings for the terminal to standard output 62Display all the current settings for the terminal to standard output
63as per 63as per
64.St -p1003.2 . 64.St -p1003.2 .
65.It Fl e 65.It Fl e
66Display all the current settings for the terminal to standard output 66Display all the current settings for the terminal to standard output
67in the traditional 67in the traditional
68.Bx 68.Bx
69``all'' and ``everything'' formats. 69``all'' and ``everything'' formats.
70.It Fl f 70.It Fl f
71Open and use the terminal named by 71Open and use the terminal named by
72.Ar file 72.Ar file
73rather than using standard input. 73rather than using standard input.
74The file is opened using the 74The file is opened using the
75.Dv O_NONBLOCK 75.Dv O_NONBLOCK
76flag of 76flag of
77.Fn open , 77.Fn open ,
78making it possible to 78making it possible to
79set or display settings on a terminal that might otherwise 79set or display settings on a terminal that might otherwise
80block on the open. 80block on the open.
81.It Fl g 81.It Fl g
82Display all the current settings for the terminal to standard output 82Display all the current settings for the terminal to standard output
83in a form that may be used as an argument to a subsequent invocation of 83in a form that may be used as an argument to a subsequent invocation of
84.Nm 84.Nm
85to restore the current terminal state as per 85to restore the current terminal state as per
86.St -p1003.2 . 86.St -p1003.2 .
87.El 87.El
88.Pp 88.Pp
89The following arguments are available to set the terminal 89The following arguments are available to set the terminal
90characteristics: 90characteristics:
91.Ss Control Modes 91.Ss Control Modes
92Control mode flags affect hardware characteristics associated with the 92Control mode flags affect hardware characteristics associated with the
93terminal. 93terminal.
94This corresponds to the c_cflag in the termios structure. 94This corresponds to the c_cflag in the termios structure.
95.Bl -tag -width Fl 95.Bl -tag -width Fl
96.It Cm parenb Pq Fl parenb 96.It Cm parenb Pq Fl parenb
97Enable (disable) parity generation 97Enable (disable) parity generation
98and detection. 98and detection.
99.It Cm parodd Pq Fl parodd 99.It Cm parodd Pq Fl parodd
100Select odd (even) parity. 100Select odd (even) parity.
101.It Cm cs5 cs6 cs7 cs8 101.It Cm cs5 cs6 cs7 cs8
102Select character size, if possible. 102Select character size, if possible.
103.It Ar number 103.It Ar number
104Set terminal baud rate to the 104Set terminal baud rate to the
105number given, if possible. 105number given, if possible.
106If the 106If the
107baud rate is set to zero, modem 107baud rate is set to zero, modem
108control is no longer 108control is no longer
109asserted. 109asserted.
110.It Cm ispeed Ar number 110.It Cm ispeed Ar number
111Set terminal input baud rate to the 111Set terminal input baud rate to the
112number given, if possible. 112number given, if possible.
113If the 113If the
114input baud rate is set to zero, the 114input baud rate is set to zero, the
115input baud rate is set to the 115input baud rate is set to the
116value of the output baud 116value of the output baud
117rate. 117rate.
118.It Cm ospeed Ar number 118.It Cm ospeed Ar number
119Set terminal output baud rate to 119Set terminal output baud rate to
120the number given, if possible. 120the number given, if possible.
121If 121If
122the output baud rate is set to 122the output baud rate is set to
123zero, modem control is 123zero, modem control is
124no longer asserted. 124no longer asserted.
125.It Cm speed Ar number 125.It Cm speed Ar number
126This sets both 126This sets both
127.Cm ispeed 127.Cm ispeed
128and 128and
129.Cm ospeed 129.Cm ospeed
130to 130to
131.Ar number . 131.Ar number .
132.It Cm hupcl Pq Fl hupcl 132.It Cm hupcl Pq Fl hupcl
133Stop asserting modem control 133Stop asserting modem control
134(do not stop asserting modem control) on last close. 134(do not stop asserting modem control) on last close.
135.It Cm hup Pq Fl hup 135.It Cm hup Pq Fl hup
136Same as hupcl 136Same as hupcl
137.Pq Fl hupcl . 137.Pq Fl hupcl .
138.It Cm cstopb Pq Fl cstopb 138.It Cm cstopb Pq Fl cstopb
139Use two (one) stop bits per character. 139Use two (one) stop bits per character.
140.It Cm cread Pq Fl cread 140.It Cm cread Pq Fl cread
141Enable (disable) the receiver. 141Enable (disable) the receiver.
142.It Cm clocal Pq Fl clocal 142.It Cm clocal Pq Fl clocal
143Assume a line without (with) modem 143Assume a line without (with) modem
144control. 144control.
145.It Cm crtscts Pq Fl crtscts 145.It Cm crtscts Pq Fl crtscts
146Enable RTS/CTS flow control. 146Enable RTS/CTS flow control.
147.It Cm cdtrcts Pq Fl cdtrcts 147.It Cm cdtrcts Pq Fl cdtrcts
148Enable DTR/CTS flow control (if supported). 148Enable DTR/CTS flow control (if supported).
149.El 149.El
150.Ss Input Modes 150.Ss Input Modes
151This corresponds to the c_iflag in the termios structure. 151This corresponds to the c_iflag in the termios structure.
152.Bl -tag -width Fl 152.Bl -tag -width Fl
153.It Cm ignbrk Pq Fl ignbrk 153.It Cm ignbrk Pq Fl ignbrk
154Ignore (do not ignore) break on 154Ignore (do not ignore) break on
155input. 155input.
156.It Cm brkint Pq Fl brkint 156.It Cm brkint Pq Fl brkint
157Signal (do not signal) 157Signal (do not signal)
158.Dv INTR 158.Dv INTR
159on 159on
160break. 160break.
161.It Cm ignpar Pq Fl ignpar 161.It Cm ignpar Pq Fl ignpar
162Ignore (do not ignore) parity 162Ignore (do not ignore) parity
163errors. 163errors.
164.It Cm parmrk Pq Fl parmrk 164.It Cm parmrk Pq Fl parmrk
165Mark (do not mark) parity errors. 165Mark (do not mark) parity errors.
166.It Cm inpck Pq Fl inpck 166.It Cm inpck Pq Fl inpck
167Enable (disable) input parity 167Enable (disable) input parity
168checking. 168checking.
169.It Cm istrip Pq Fl istrip 169.It Cm istrip Pq Fl istrip
170Strip (do not strip) input characters 170Strip (do not strip) input characters
171to seven bits. 171to seven bits.
172.It Cm inlcr Pq Fl inlcr 172.It Cm inlcr Pq Fl inlcr
173Map (do not map) 173Map (do not map)
174.Dv NL 174.Dv NL
175to 175to
176.Dv CR 176.Dv CR
177on input. 177on input.
178.It Cm igncr Pq Fl igncr 178.It Cm igncr Pq Fl igncr
179Ignore (do not ignore) 179Ignore (do not ignore)
180.Dv CR 180.Dv CR
181on input. 181on input.
182.It Cm icrnl Pq Fl icrnl 182.It Cm icrnl Pq Fl icrnl
183Map (do not map) 183Map (do not map)
184.Dv CR 184.Dv CR
185to 185to
186.Dv NL 186.Dv NL
187on input. 187on input.
188.It Cm ixon Pq Fl ixon 188.It Cm ixon Pq Fl ixon
189Enable (disable) 189Enable (disable)
190.Dv START/STOP 190.Dv START/STOP
191output 191output
192control. 192control.
193Output from the system is 193Output from the system is
194stopped when the system receives 194stopped when the system receives
195.Dv STOP 195.Dv STOP
196and started when the system 196and started when the system
197receives 197receives
198.Dv START , 198.Dv START ,
199or if 199or if
200.Cm ixany 200.Cm ixany
201is set, any character restarts output. 201is set, any character restarts output.
202.It Cm ixoff Pq Fl ixoff 202.It Cm ixoff Pq Fl ixoff
203Request that the system send (not 203Request that the system send (not
204send) 204send)
205.Dv START/STOP 205.Dv START/STOP
206characters when 206characters when
207the input queue is nearly 207the input queue is nearly
208empty/full. 208empty/full.
209.It Cm ixany Pq Fl ixany 209.It Cm ixany Pq Fl ixany
210Allow any character (allow only 210Allow any character (allow only
211.Dv START ) 211.Dv START )
212to restart output. 212to restart output.
213.It Cm imaxbel Pq Fl imaxbel 213.It Cm imaxbel Pq Fl imaxbel
214The system imposes a limit of 214The system imposes a limit of
215.Dv MAX_INPUT 215.Dv MAX_INPUT
216(currently 255) characters in the input queue. 216(currently 255) characters in the input queue.
217If 217If
218.Cm imaxbel 218.Cm imaxbel
219is set and the input queue limit has been reached, 219is set and the input queue limit has been reached,
220subsequent input causes the system to send an ASCII BEL 220subsequent input causes the system to send an ASCII BEL
221character to the output queue (the terminal beeps at you). 221character to the output queue (the terminal beeps at you).
222Otherwise, 222Otherwise,
223if 223if
224.Cm imaxbel 224.Cm imaxbel
225is unset and the input queue is full, the next input character causes 225is unset and the input queue is full, the next input character causes
226the entire input and output queues to be discarded. 226the entire input and output queues to be discarded.
227.El 227.El
228.Ss Output Modes 228.Ss Output Modes
229This corresponds to the c_oflag of the termios structure. 229This corresponds to the c_oflag of the termios structure.
230.Bl -tag -width Fl 230.Bl -tag -width Fl
231.It Cm opost Pq Fl opost 231.It Cm opost Pq Fl opost
232Post-process output (do not 232Post-process output (do not
233post-process output; ignore all other 233post-process output; ignore all other
234output modes). 234output modes).
235.It Cm onlcr Pq Fl onlcr 235.It Cm onlcr Pq Fl onlcr
236Map (do not map) 236Map (do not map)
237.Dv NL 237.Dv NL
238to 238to
239.Dv CR-NL 239.Dv CR-NL
240on output. 240on output.
241.It Cm ocrnl Pq Fl ocrnl 241.It Cm ocrnl Pq Fl ocrnl
242Map (do not map) 242Map (do not map)
243.Dv CR 243.Dv CR
244to 244to
245.Dv NL 245.Dv NL
246on output. 246on output.
247.It Cm oxtabs Pq Fl oxtabs 247.It Cm oxtabs Pq Fl oxtabs
248Expand (do not expand) tabs to spaces on output. 248Expand (do not expand) tabs to spaces on output.
249.It Cm onocr Pq Fl onocr 249.It Cm onocr Pq Fl onocr
250Do not (do) output CRs at column zero. 250Do not (do) output CRs at column zero.
251.It Cm onlret Pq Fl onlret 251.It Cm onlret Pq Fl onlret
252On the terminal NL performs (does not perform) the CR function. 252On the terminal NL performs (does not perform) the CR function.
253.El 253.El
254.Ss Local Modes 254.Ss Local Modes
255Local mode flags (lflags) affect various and sundry characteristics of terminal 255Local mode flags (lflags) affect various and sundry characteristics of terminal
256processing. 256processing.
257Historically the term "local" pertained to new job control features 257Historically the term "local" pertained to new job control features
258implemented by Jim Kulp on a 258implemented by Jim Kulp on a
259.Tn PDP Ns -11/70 259.Tn PDP Ns -11/70
260at 260at
261.Tn IIASA . 261.Tn IIASA .
262Later the driver ran on the first 262Later the driver ran on the first
263.Tn VAX 263.Tn VAX
264at Evans Hall, UC Berkeley, where the job control details 264at Evans Hall, UC Berkeley, where the job control details
265were greatly modified but the structure definitions and names 265were greatly modified but the structure definitions and names
266remained essentially unchanged. 266remained essentially unchanged.
267The second interpretation of the 'l' in lflag 267The second interpretation of the 'l' in lflag
268is ``line discipline flag'' which corresponds to the 268is ``line discipline flag'' which corresponds to the
269.Ar c_lflag 269.Ar c_lflag
270of the 270of the
271.Ar termios 271.Ar termios
272structure. 272structure.
273.Bl -tag -width Fl 273.Bl -tag -width Fl
274.It Cm isig Pq Fl isig 274.It Cm isig Pq Fl isig
275Enable (disable) the checking of 275Enable (disable) the checking of
276characters against the special control 276characters against the special control
277characters 277characters
278.Dv INTR , QUIT , 278.Dv INTR , QUIT ,
279and 279and
280.Dv SUSP . 280.Dv SUSP .
281.It Cm icanon Pq Fl icanon 281.It Cm icanon Pq Fl icanon
282Enable (disable) canonical input 282Enable (disable) canonical input
283.Pf ( Dv ERASE 283.Pf ( Dv ERASE
284and 284and
285.Dv KILL 285.Dv KILL
286processing). 286processing).
287.It Cm iexten Pq Fl iexten 287.It Cm iexten Pq Fl iexten
288Enable (disable) any implementation 288Enable (disable) any implementation
289defined special control characters 289defined special control characters
290not currently controlled by icanon, 290not currently controlled by icanon,
291isig, or ixon. 291isig, or ixon.
292.It Cm echo Pq Fl echo 292.It Cm echo Pq Fl echo
293Echo back (do not echo back) every 293Echo back (do not echo back) every
294character typed. 294character typed.
295.It Cm echoe Pq Fl echoe 295.It Cm echoe Pq Fl echoe
296The 296The
297.Dv ERASE 297.Dv ERASE
298character shall (shall 298character shall (shall
299not) visually erase the last character 299not) visually erase the last character
300in the current line from the 300in the current line from the
301display, if possible. 301display, if possible.
302.It Cm echok Pq Fl echok 302.It Cm echok Pq Fl echok
303Echo (do not echo) 303Echo (do not echo)
304.Dv NL 304.Dv NL
305after 305after
306.Dv KILL 306.Dv KILL
307character. 307character.
308.It Cm echoke Pq Fl echoke 308.It Cm echoke Pq Fl echoke
309The 309The
310.Dv KILL 310.Dv KILL
311character shall (shall 311character shall (shall
312not) visually erase 312not) visually erase
313the current line from the 313the current line from the
314display, if possible. 314display, if possible.
315.It Cm echonl Pq Fl echonl 315.It Cm echonl Pq Fl echonl
316Echo (do not echo) 316Echo (do not echo)
317.Dv NL , 317.Dv NL ,
318even if echo 318even if echo
319is disabled. 319is disabled.
320.It Cm echoctl Pq Fl echoctl 320.It Cm echoctl Pq Fl echoctl
321If 321If
322.Cm echoctl 322.Cm echoctl
323is set, echo control characters as ^X. 323is set, echo control characters as ^X.
324Otherwise control characters echo as themselves. 324Otherwise control characters echo as themselves.
325.It Cm echoprt Pq Fl echoprt 325.It Cm echoprt Pq Fl echoprt
326For printing terminals. 326For printing terminals.
327If set, echo erased characters backwards within ``\\'' 327If set, echo erased characters backwards within ``\\''
328and ``/''. 328and ``/''.
329Otherwise, disable this feature. 329Otherwise, disable this feature.
330.It Cm noflsh Pq Fl noflsh 330.It Cm noflsh Pq Fl noflsh
331Disable (enable) flush after 331Disable (enable) flush after
332.Dv INTR , QUIT , SUSP . 332.Dv INTR , QUIT , SUSP .
333.It Cm tostop Pq Fl tostop 333.It Cm tostop Pq Fl tostop
334Send (do not send) 334Send (do not send)
335.Dv SIGTTOU 335.Dv SIGTTOU
336for background output. 336for background output.
337This causes background jobs to stop if they attempt terminal output. 337This causes background jobs to stop if they attempt terminal output.
338.It Cm altwerase Pq Fl altwerase 338.It Cm altwerase Pq Fl altwerase
339Use (do not use) an alternative word erase algorithm when processing 339Use (do not use) an alternative word erase algorithm when processing
340.Dv WERASE 340.Dv WERASE
341characters. 341characters.
342This alternative algorithm considers sequences of 342This alternative algorithm considers sequences of
343alphanumeric/underscores as words. 343alphanumeric/underscores as words.
344It also skips the first preceding character in its classification 344It also skips the first preceding character in its classification
345(as a convenience since the one preceding character could have been 345(as a convenience since the one preceding character could have been
346erased with simply an 346erased with simply an
347.Dv ERASE 347.Dv ERASE
348character.) 348character.)
349.It Cm mdmbuf Pq Fl mdmbuf 349.It Cm mdmbuf Pq Fl mdmbuf
350If set, flow control output based on condition of Carrier Detect. 350If set, flow control output based on condition of Carrier Detect.
351Otherwise writes return an error if Carrier Detect is low (and Carrier 351Otherwise writes return an error if Carrier Detect is low (and Carrier
352is not being ignored with the 352is not being ignored with the
353.Dv CLOCAL 353.Dv CLOCAL
354flag.) 354flag.)
355.It Cm flusho Pq Fl flusho 355.It Cm flusho Pq Fl flusho
356Indicates output is (is not) being discarded. 356Indicates output is (is not) being discarded.
357.It Cm pendin Pq Fl pendin 357.It Cm pendin Pq Fl pendin
358Indicates input is (is not) pending after a switch from non-canonical 358Indicates input is (is not) pending after a switch from non-canonical
359to canonical mode and will be re-input when a read becomes pending 359to canonical mode and will be re-input when a read becomes pending
360or more input arrives. 360or more input arrives.
361.El 361.El
362.Ss Control Characters 362.Ss Control Characters
363.Bl -tag -width Fl 363.Bl -tag -width Fl
364.It Ar control-character Ar string 364.It Ar control-character Ar string
365Set 365Set
366.Ar control-character 366.Ar control-character
367to 367to
368.Ar string . 368.Ar string .
369If string is a single character, 369If string is a single character,
370the control character is set to 370the control character is set to
371that character. 371that character.
372If string is the 372If string is the
373two character sequence "^-" or the 373two character sequence "^-" or the
374string "undef" the control character 374string "undef" the control character
375is disabled (i.e. set to 375is disabled (i.e. set to
376.Bro Dv _POSIX_VDISABLE Brc . ) 376.Bro Dv _POSIX_VDISABLE Brc . )
377.Pp 377.Pp
378Recognized control-characters: 378Recognized control-characters:
379.Bd -ragged -offset indent 379.Bd -ragged -offset indent
380.Bl -column character Subscript Description 380.Bl -column character Subscript Description
381.It control- Ta "" Ta "" 381.It control- Ta "" Ta ""
382.It character Subscript Description 382.It character Subscript Description
383.It _________ _________ _______________ 383.It _________ _________ _______________
384.It eof Ta Tn VEOF Ta EOF No character 384.It eof Ta Tn VEOF Ta EOF No character
385.It eol Ta Tn VEOL Ta EOL No character 385.It eol Ta Tn VEOL Ta EOL No character
386.It eol2 Ta Tn VEOL2 Ta EOL2 No character 386.It eol2 Ta Tn VEOL2 Ta EOL2 No character
387.It erase Ta Tn VERASE Ta ERASE No character 387.It erase Ta Tn VERASE Ta ERASE No character
388.It werase Ta Tn VWERASE Ta WERASE No character 388.It werase Ta Tn VWERASE Ta WERASE No character
389.It kill Ta Tn VKILL Ta KILL No character 389.It kill Ta Tn VKILL Ta KILL No character
390.It reprint Ta Tn VREPRINT Ta REPRINT No character 390.It reprint Ta Tn VREPRINT Ta REPRINT No character
391.It intr Ta Tn VINTR Ta INTR No character 391.It intr Ta Tn VINTR Ta INTR No character
392.It quit Ta Tn VQUIT Ta QUIT No character 392.It quit Ta Tn VQUIT Ta QUIT No character
393.It susp Ta Tn VSUSP Ta SUSP No character 393.It susp Ta Tn VSUSP Ta SUSP No character
394.It dsusp Ta Tn VDSUSP Ta DSUSP No character 394.It dsusp Ta Tn VDSUSP Ta DSUSP No character
395.It start Ta Tn VSTART Ta START No character 395.It start Ta Tn VSTART Ta START No character
396.It stop Ta Tn VSTOP Ta STOP No character 396.It stop Ta Tn VSTOP Ta STOP No character
397.It lnext Ta Tn VLNEXT Ta LNEXT No character 397.It lnext Ta Tn VLNEXT Ta LNEXT No character
398.It status Ta Tn VSTATUS Ta STATUS No character 398.It status Ta Tn VSTATUS Ta STATUS No character
399.It discard Ta Tn VDISCARD Ta DISCARD No character 399.It discard Ta Tn VDISCARD Ta DISCARD No character
400.El 400.El
401.Ed 401.Ed
402.It Cm min Ar number 402.It Cm min Ar number
403.It Cm time Ar number 403.It Cm time Ar number
404Set the value of min or time to 404Set the value of min or time to
405number. 405number.
406.Dv MIN 406.Dv MIN
407and 407and
408.Dv TIME 408.Dv TIME
409are used in 409are used in
410Non-Canonical mode input processing 410Non-Canonical mode input processing
411(-icanon). 411(-icanon).
412.El 412.El
413.Ss Combination Modes 413.Ss Combination Modes
414.Bl -tag -width Fl 414.Bl -tag -width Fl
415.It Ar saved settings 415.It Ar saved settings
416Set the current terminal characteristics to the saved settings 416Set the current terminal characteristics to the saved settings
417produced by the 417produced by the
418.Fl g 418.Fl g
419option. 419option.
420.It Cm evenp No or Cm parity 420.It Cm evenp No or Cm parity
421Enable parenb and cs7; disable parodd. 421Enable parenb and cs7; disable parodd.
422.It Cm oddp 422.It Cm oddp
423Enable parenb, cs7, and parodd. 423Enable parenb, cs7, and parodd.
424.It Fl parity , evenp , oddp 424.It Fl parity , evenp , oddp
425Disable parenb, and set cs8. 425Disable parenb, and set cs8.
426.It Cm \&nl Pq Fl \&nl 426.It Cm \&nl Pq Fl \&nl
427Enable (disable) icrnl. 427Enable (disable) icrnl.
428In addition 428In addition
429-nl unsets inlcr and igncr. 429-nl unsets inlcr and igncr.
430.It Cm ek 430.It Cm ek
431Reset 431Reset
432.Dv ERASE 432.Dv ERASE
433and 433and
434.Dv KILL 434.Dv KILL
435characters back to system defaults. 435characters back to system defaults.
436.It Cm sane 436.It Cm sane
437Resets all modes to reasonable values for interactive terminal use. 437Resets all modes to reasonable values for interactive terminal use.
438.It Cm insane 438.It Cm insane
439Sets all modes to random values, which are very likely 439Sets all modes to random values, which are very likely
440.Pq but not guaranteed 440.Pq but not guaranteed
441to be unreasonable for interactive terminal use. 441to be unreasonable for interactive terminal use.
442.It Cm tty 442.It Cm tty
443Set the line discipline to the standard terminal line discipline 443Set the line discipline to the standard terminal line discipline
444.Dv TTYDISC . 444.Dv TTYDISC .
445.It Cm crt Pq Fl crt 445.It Cm crt Pq Fl crt
446Set (disable) all modes suitable for a CRT display device. 446Set (disable) all modes suitable for a CRT display device.
447.It Cm kerninfo Pq Fl kerninfo 447.It Cm kerninfo Pq Fl kerninfo
448Enable (disable) the system generated status line associated with 448Enable (disable) the system generated status line associated with
449processing a 449processing a
450.Dv STATUS 450.Dv STATUS
451character (usually set to ^T). 451character (usually set to ^T).
452The status line consists of the 452The status line consists of the
453system load average, the current command name, its process ID, the 453system load average, the current command name, its process ID, the
454event the process is waiting on (or the status of the process), the user 454event the process is waiting on (or the status of the process), the user
455and system times, percent CPU, and current memory usage. 455and system times, percent CPU, and current memory usage.
456.It Cm columns Ar number 456.It Cm columns Ar number
457The terminal size is recorded as having 457The terminal size is recorded as having
458.Ar number 458.Ar number
459columns. 459columns.
460.It Cm cols Ar number 460.It Cm cols Ar number
461is an alias for 461is an alias for
462.Cm columns . 462.Cm columns .
463.It Cm rows Ar number 463.It Cm rows Ar number
464The terminal size is recorded as having 464The terminal size is recorded as having
465.Ar number 465.Ar number
466rows. 466rows.
467.It Cm dec 467.It Cm dec
468Set modes suitable for users of Digital Equipment Corporation systems ( 468Set modes suitable for users of Digital Equipment Corporation systems (
469.Dv ERASE , 469.Dv ERASE ,
470.Dv KILL , 470.Dv KILL ,
471and 471and
472.Dv INTR 472.Dv INTR
473characters are set to ^?, ^U, and ^C; 473characters are set to ^?, ^U, and ^C;
474.Dv ixany 474.Dv ixany
475is disabled, and 475is disabled, and
476.Dv crt 476.Dv crt
477is enabled.) 477is enabled.)
478.It Cm extproc Pq Fl extproc 478.It Cm extproc Pq Fl extproc
479If set, this flag indicates that some amount of terminal processing is being 479If set, this flag indicates that some amount of terminal processing is being
480performed by either the terminal hardware or by the remote side connected 480performed by either the terminal hardware or by the remote side connected
481to a pty. 481to a pty.
482.It Cm raw Pq Fl raw 482.It Cm raw Pq Fl raw
483If set, change the modes of the terminal so that no input or output processing 483If set, change the modes of the terminal so that no input or output processing
484is performed. 484is performed.
485If unset, change the modes of the terminal to some reasonable 485If unset, change the modes of the terminal to some reasonable
486state that performs input and output processing. 486state that performs input and output processing.
487Note that since the terminal driver no longer has a single 487Note that since the terminal driver no longer has a single
488.Dv RAW 488.Dv RAW
489bit, it is not possible to intuit what flags were set prior to setting 489bit, it is not possible to intuit what flags were set prior to setting
490.Cm raw . 490.Cm raw .
491This means that unsetting 491This means that unsetting
492.Cm raw 492.Cm raw
493may not put back all the setting that were previously in effect. 493may not put back all the setting that were previously in effect.
494To set the terminal into a raw state and then accurately restore it, the following 494To set the terminal into a raw state and then accurately restore it, the following
495shell code is recommended: 495shell code is recommended:
496.Bd -literal -offset indent 496.Bd -literal -offset indent
497save_state=$(stty -g) 497save_state=$(stty -g)
498stty raw 498stty raw
499\&... 499\&...
500stty "$save_state" 500stty "$save_state"
501.Ed 501.Ed
502.It Cm size 502.It Cm size
503The size of the terminal is printed as two numbers on a single line, 503The size of the terminal is printed as two numbers on a single line,
504first rows, then columns. 504first rows, then columns.
505.El 505.El
506.Ss Compatibility Modes 506.Ss Compatibility Modes
507These modes remain for compatibility with the previous version of 507These modes remain for compatibility with the previous version of
508the stty command. 508the stty command.
509.Bl -tag -width Fl 509.Bl -tag -width Fl
510.It Cm all 510.It Cm all
511Reports all the terminal modes as with 511Reports all the terminal modes as with
512.Cm stty Fl a 512.Cm stty Fl a
513except that the control characters are printed in a columnar format. 513except that the control characters are printed in a columnar format.
514.It Cm everything 514.It Cm everything
515Same as 515Same as
516.Cm all . 516.Cm all .
517.It Cm cooked 517.It Cm cooked
518Same as 518Same as
519.Cm sane . 519.Cm sane .
520.It Cm cbreak 520.It Cm cbreak
521If set, enables 521If set, enables
522.Cm brkint , ixon , imaxbel , opost , 522.Cm brkint , ixon , imaxbel , opost ,
523.Cm isig , iexten , 523.Cm isig , iexten ,
524and 524and
525.Fl icanon . 525.Fl icanon .
526If unset, same as 526If unset, same as
527.Cm sane . 527.Cm sane .
528.It Cm new 528.It Cm new
529Same as 529Same as
530.Cm tty . 530.Cm tty .
531.It Cm old 531.It Cm old
532Same as 532Same as
533.Cm tty . 533.Cm tty .
534.It Cm newcrt Pq Fl newcrt 534.It Cm newcrt Pq Fl newcrt
535Same as 535Same as
536.Cm crt . 536.Cm crt .
537.It Cm pass8 537.It Cm pass8
538The converse of 538The converse of
539.Cm parity . 539.Cm parity .
540.It Cm tandem Pq Fl tandem 540.It Cm tandem Pq Fl tandem
541Same as 541Same as
542.Cm ixoff . 542.Cm ixoff .
543.It Cm decctlq Pq Fl decctlq 543.It Cm decctlq Pq Fl decctlq
544The converse of 544The converse of
545.Cm ixany . 545.Cm ixany .
546.It Cm crterase Pq Fl crterase 546.It Cm crterase Pq Fl crterase
547Same as 547Same as
548.Cm echoe . 548.Cm echoe .
549.It Cm crtbs Pq Fl crtbs 549.It Cm crtbs Pq Fl crtbs
550Same as 550Same as
551.Cm echoe . 551.Cm echoe .
552.It Cm crtkill Pq Fl crtkill 552.It Cm crtkill Pq Fl crtkill
553Same as 553Same as
554.Cm echoke . 554.Cm echoke .
555.It Cm ctlecho Pq Fl ctlecho 555.It Cm ctlecho Pq Fl ctlecho
556Same as 556Same as
557.Cm echoctl . 557.Cm echoctl .
558.It Cm prterase Pq Fl prterase 558.It Cm prterase Pq Fl prterase
559Same as 559Same as
560.Cm echoprt . 560.Cm echoprt .
561.It Cm litout Pq Fl litout 561.It Cm litout Pq Fl litout
562The converse of 562The converse of
563.Cm opost . 563.Cm opost .
564.It Cm tabs Pq Fl tabs 564.It Cm tabs Pq Fl tabs
565The converse of 565The converse of
566.Cm oxtabs . 566.Cm oxtabs .
567.It Cm brk Ar value 567.It Cm brk Ar value
568Same as the control character 568Same as the control character
569.Cm eol . 569.Cm eol .
570.It Cm flush Ar value 570.It Cm flush Ar value
571Same as the control character 571Same as the control character
572.Cm discard . 572.Cm discard .
573.It Cm rprnt Ar value 573.It Cm rprnt Ar value
574Same as the control character 574Same as the control character
575.Cm reprint . 575.Cm reprint .
576.El 576.El
577.Ss Control operations 577.Ss Control operations
578These operations are not modes, but rather commands to be performed by 578These operations are not modes, but rather commands to be performed by
579the tty layer. 579the tty layer.
580.Bl -tag -width Fl 580.Bl -tag -width Fl
581.It Cm ostart 581.It Cm ostart
582Performs a "start output" operation, as normally done by an 582Performs a "start output" operation, as normally done by an
583incoming START character when 583incoming START character when
584.Cm ixon 584.Cm ixon
585is set. 585is set.
586.It Cm ostop 586.It Cm ostop
587Performs a "stop output" operation, as normally done by an 587Performs a "stop output" operation, as normally done by an
588incoming STOP character when 588incoming STOP character when
589.Cm ixon 589.Cm ixon
590is set. 590is set.
591.El 591.El
592.Sh EXIT STATUS 592.Sh EXIT STATUS
593The 593The
594.Nm 594.Nm
595utility exits with a value of 0 if successful, and \*[Gt]0 if an error occurs. 595utility exits with a value of 0 if successful, and \*[Gt]0 if an error occurs.
596.Sh SEE ALSO 596.Sh SEE ALSO
597.Xr termios 4 , 597.Xr termios 4 ,
598.Xr tty 4 598.Xr tty 4
599.Sh STANDARDS 599.Sh STANDARDS
600The 600The
601.Nm 601.Nm
602utility is expected to be 602utility is expected to be
603.St -p1003.2 603.St -p1003.2
604compatible. 604compatible.
605The flags 605The flags
606.Fl e 606.Fl e
607and 607and
608.Fl f 608.Fl f
609are 609are
610extensions to the standard, as are the operands mentioned in the control 610extensions to the standard, as are the operands mentioned in the control
611operations section. 611operations section.