BSD 4_4 development
[unix-history] / usr / share / man / cat1 / stty.0
index e72ed4b..3b483f3 100644 (file)
-STTY(1)                     UNIX Reference Manual                     STTY(1)
+STTY(1)                      BSD Reference Manual                      STTY(1)
 
 N\bNA\bAM\bME\bE
 
 N\bNA\bAM\bME\bE
-     s\bst\btt\bty\by - Set the options for a terminal.
+     s\bst\btt\bty\by - set the options for a terminal device interface
 
 S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
 
 S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
-     s\bst\btt\bty\by [-\b-a\ba | -\b-g\bg]
-     s\bst\btt\bty\by [arguments]
+     s\bst\btt\bty\by [-\b-a\ba | -\b-e\be | -\b-g\bg] [-\b-f\bf _\bf_\bi_\bl_\be] [operands]
 
 D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
 
 D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
-     The stty utility sets or reports on terminal I/O characteristics for the
-     device that is its standard input.  Without options or arguments speci-
-     fied, it reports the settings of certain characteristics, usually those
-     that differ from implementation-defined defaults. Otherwise it modifies
-     the terminal state according to the specified arguments.  Some combina-
-     tions of arguments are mutually exclusive on some terminal types.
+     The s\bst\btt\bty\by utility sets or reports on terminal characteristics for the de-
+     vice that is its standard input.  If no options or operands are speci-
+     fied, it reports the settings of a subset of characteristics as well as
+     additional ones if they differ from their default values.  Otherwise it
+     modifies the terminal state according to the specified arguments.  Some
+     combinations of arguments are mutually exclusive on some terminal types.
 
      The following options are available:
 
 
      The following options are available:
 
-     -\b-a\ba    Write to standard output all the current settings for the terminal.
+     -\b-a\ba      Display all the current settings for the terminal to standard
+             output as per IEEE Std1003.2 (``POSIX'').
 
 
-     -\b-g\bg    Write to standard output the current settings in an unspecified
-          form that can be used as arguments to another stty utility on the
-          same system.
+     -\b-e\be      Display all the current settings for the terminal to standard
+             output in the traditional BSD ``all'' and ``everything'' formats.
+
+     -\b-f\bf      Open and use the terminal named by _\bf_\bi_\bl_\be rather than using stan-
+             dard input.  The file is opened using the O_NONBLOCK flag of
+             o\bop\bpe\ben\bn(), making it possible to set or display settings on a termi-
+             nal that might otherwise block on the open.
+
+     -\b-g\bg      Display all the current settings for the terminal to standard
+             output in a form that may be used as an argument to a subsequent
+             invocation of s\bst\btt\bty\by to restore the current terminal state as per
+             IEEE Std1003.2 (``POSIX'').
 
      The following arguments are available to set the terminal characteris-
      tics:
 
 
      The following arguments are available to set the terminal characteris-
      tics:
 
+   C\bCo\bon\bnt\btr\bro\bol\bl M\bMo\bod\bde\bes\bs:\b:
+
+     Control mode flags affect hardware characteristics associated with the
+     terminal.  This corresponds to the c_cflag in the termios structure.
+
      p\bpa\bar\bre\ben\bnb\bb (-\b-p\bpa\bar\bre\ben\bnb\bb)
      p\bpa\bar\bre\ben\bnb\bb (-\b-p\bpa\bar\bre\ben\bnb\bb)
-              Enable (disable) parity generation and detection.
+                 Enable (disable) parity generation and detection.
 
      p\bpa\bar\bro\bod\bdd\bd (-\b-p\bpa\bar\bro\bod\bdd\bd)
 
      p\bpa\bar\bro\bod\bdd\bd (-\b-p\bpa\bar\bro\bod\bdd\bd)
-              Select odd (even) parity.
+                 Select odd (even) parity.
 
      c\bcs\bs5\b5 c\bcs\bs6\b6 c\bcs\bs7\b7 c\bcs\bs8\b8
 
      c\bcs\bs5\b5 c\bcs\bs6\b6 c\bcs\bs7\b7 c\bcs\bs8\b8
-              Select character size, if possible.
+                 Select character size, if possible.
 
 
-     _\bn_\bu_\bm_\bb_\be_\br    Set terminal baud rate to the number given, if possible.  If
-              the baud rate is set to zero, modem control is no longer as-
-              serted.
+     _\bn_\bu_\bm_\bb_\be_\br      Set terminal baud rate to the number given, if possible.  If
+                 the baud rate is set to zero, modem control is no longer as-
+                 serted.
 
      i\bis\bsp\bpe\bee\bed\bd _\bn_\bu_\bm_\bb_\be_\br
 
      i\bis\bsp\bpe\bee\bed\bd _\bn_\bu_\bm_\bb_\be_\br
-              Set terminal input baud rate to the number given, if possible.
-              If the input baud rate is set to zero, the input baud rate is
-              set to the value of the output baud rate.
+                 Set terminal input baud rate to the number given, if possi-
+                 ble.  If the input baud rate is set to zero, the input baud
+                 rate is set to the value of the output baud rate.
 
      o\bos\bsp\bpe\bee\bed\bd _\bn_\bu_\bm_\bb_\be_\br
 
      o\bos\bsp\bpe\bee\bed\bd _\bn_\bu_\bm_\bb_\be_\br
-              Set terminal output baud rate to the number given, if possible.
-              If the output baud rate is set to zero, modem control is no
-              longer asserted.
+                 Set terminal output baud rate to the number given, if possi-
+                 ble.  If the output baud rate is set to zero, modem control
+
+
+                 is no longer asserted.
+
+     s\bsp\bpe\bee\bed\bd _\bn_\bu_\bm_\bb_\be_\br
+                 This sets both i\bis\bsp\bpe\bee\bed\bd and o\bos\bsp\bpe\bee\bed\bd to _\bn_\bu_\bm_\bb_\be_\br.
 
      h\bhu\bup\bpc\bcl\bl (-\b-h\bhu\bup\bpc\bcl\bl)
 
      h\bhu\bup\bpc\bcl\bl (-\b-h\bhu\bup\bpc\bcl\bl)
-              Stop asserting modem control (do not stop asserting modem
-              control) on last close.
+                 Stop asserting modem control (do not stop asserting modem
+                 control) on last close.
 
 
-     h\bhu\bup\bp (-\b-h\bhu\bup\bp)
-              Same as hupcl  (-\b-h\bhu\bup\bpc\bcl\bl)\b).\b.
+     h\bhu\bup\bp (-\b-h\bhu\bup\bp)  Same as hupcl (-\b-h\bhu\bup\bpc\bcl\bl).
 
      c\bcs\bst\bto\bop\bpb\bb (-\b-c\bcs\bst\bto\bop\bpb\bb)
 
      c\bcs\bst\bto\bop\bpb\bb (-\b-c\bcs\bst\bto\bop\bpb\bb)
-              Use two (one) stop bits per character.
+                 Use two (one) stop bits per character.
 
      c\bcr\bre\bea\bad\bd (-\b-c\bcr\bre\bea\bad\bd)
 
      c\bcr\bre\bea\bad\bd (-\b-c\bcr\bre\bea\bad\bd)
-              Enable (disable) the receiver.
+                 Enable (disable) the receiver.
 
      c\bcl\blo\boc\bca\bal\bl (-\b-c\bcl\blo\boc\bca\bal\bl)
 
      c\bcl\blo\boc\bca\bal\bl (-\b-c\bcl\blo\boc\bca\bal\bl)
-              Assume a line without (with) modem control.
+                 Assume a line without (with) modem control.
+
+     c\bcr\brt\bts\bsc\bct\bts\bs (-\b-c\bcr\brt\bts\bsc\bct\bts\bs)
+                 Enable RTS/CTS flow control.
+
+   I\bIn\bnp\bpu\but\bt M\bMo\bod\bde\bes\bs:\b:
+     This corresponds to the c_iflag in the termios structure.
+
      i\big\bgn\bnb\bbr\brk\bk (-\b-i\big\bgn\bnb\bbr\brk\bk)
      i\big\bgn\bnb\bbr\brk\bk (-\b-i\big\bgn\bnb\bbr\brk\bk)
-              Ignore (do not ignore) break on input.
+                 Ignore (do not ignore) break on input.
 
      b\bbr\brk\bki\bin\bnt\bt (-\b-b\bbr\brk\bki\bin\bnt\bt)
 
      b\bbr\brk\bki\bin\bnt\bt (-\b-b\bbr\brk\bki\bin\bnt\bt)
-              Signal (do not signal) INTR on break.
+                 Signal (do not signal) INTR on break.
 
      i\big\bgn\bnp\bpa\bar\br (-\b-i\big\bgn\bnp\bpa\bar\br)
 
      i\big\bgn\bnp\bpa\bar\br (-\b-i\big\bgn\bnp\bpa\bar\br)
-              Ignore (do not ignore) parity errors.
+                 Ignore (do not ignore) parity errors.
 
      p\bpa\bar\brm\bmr\brk\bk (-\b-p\bpa\bar\brm\bmr\brk\bk)
 
      p\bpa\bar\brm\bmr\brk\bk (-\b-p\bpa\bar\brm\bmr\brk\bk)
-              Mark (do not mark) parity errors.
+                 Mark (do not mark) parity errors.
 
      i\bin\bnp\bpc\bck\bk (-\b-i\bin\bnp\bpc\bck\bk)
 
      i\bin\bnp\bpc\bck\bk (-\b-i\bin\bnp\bpc\bck\bk)
-              Enable (disable) input parity checking.
+                 Enable (disable) input parity checking.
 
      i\bis\bst\btr\bri\bip\bp (-\b-i\bis\bst\btr\bri\bip\bp)
 
      i\bis\bst\btr\bri\bip\bp (-\b-i\bis\bst\btr\bri\bip\bp)
-              Strip (do not strip) input characters to seven bits.
+                 Strip (do not strip) input characters to seven bits.
 
      i\bin\bnl\blc\bcr\br (-\b-i\bin\bnl\blc\bcr\br)
 
      i\bin\bnl\blc\bcr\br (-\b-i\bin\bnl\blc\bcr\br)
-              Map (do not map) NL to CR on input.
+                 Map (do not map) NL to CR on input.
 
      i\big\bgn\bnc\bcr\br (-\b-i\big\bgn\bnc\bcr\br)
 
      i\big\bgn\bnc\bcr\br (-\b-i\big\bgn\bnc\bcr\br)
-              Ignore (do not ignore) CR on input.
+                 Ignore (do not ignore) CR on input.
 
      i\bic\bcr\brn\bnl\bl (-\b-i\bic\bcr\brn\bnl\bl)
 
      i\bic\bcr\brn\bnl\bl (-\b-i\bic\bcr\brn\bnl\bl)
-              Map (do not map) CR to NL on input.
+                 Map (do not map) CR to NL on input.
 
      i\bix\bxo\bon\bn (-\b-i\bix\bxo\bon\bn)
 
      i\bix\bxo\bon\bn (-\b-i\bix\bxo\bon\bn)
-              Enable (disable) START/STOP output control.  Output from the
-              system is stopped when the system receives STOP and started
-              when the system receives START.
+                 Enable (disable) START/STOP output control.  Output from the
+                 system is stopped when the system receives STOP and started
+                 when the system receives START, or if i\bix\bxa\ban\bny\by is set, any char-
+                 acter restarts output.
 
      i\bix\bxo\bof\bff\bf (-\b-i\bix\bxo\bof\bff\bf)
 
      i\bix\bxo\bof\bff\bf (-\b-i\bix\bxo\bof\bff\bf)
-              Request that the system send (not send) START/STOP characters
-              when the input queue is nearly empty/full.
+                 Request that the system send (not send) START/STOP characters
+                 when the input queue is nearly empty/full.
+
+     i\bix\bxa\ban\bny\by (-\b-i\bix\bxa\ban\bny\by)
+
+
+                 Allow any character (allow only START) to restart output.
+
+     i\bim\bma\bax\bxb\bbe\bel\bl (-\b-i\bim\bma\bax\bxb\bbe\bel\bl)
+                 The system imposes a limit of MAX_INPUT (currently 255) char-
+                 acters in the input queue.  If i\bim\bma\bax\bxb\bbe\bel\bl is set and the input
+                 queue limit has been reached, subsequent input causes the
+                 system to send an ASCII BEL character to the output queue
+                 (the terminal beeps at you).  Otherwise, if i\bim\bma\bax\bxb\bbe\bel\bl is unset
+                 and the input queue is full, the next input character causes
+                 the entire input and output queues to be discarded.
+
+   O\bOu\but\btp\bpu\but\bt M\bMo\bod\bde\bes\bs:\b:
+     This corresponds to the c_oflag of the termios structure.
 
      o\bop\bpo\bos\bst\bt (-\b-o\bop\bpo\bos\bst\bt)
 
      o\bop\bpo\bos\bst\bt (-\b-o\bop\bpo\bos\bst\bt)
-              Post-process output (do not post-process output; ignore all
-              other output modes).
+                 Post-process output (do not post-process output; ignore all
+                 other output modes).
+
+     o\bon\bnl\blc\bcr\br (-\b-o\bon\bnl\blc\bcr\br)
+                 Map (not not map) NL to on output.
+
+     o\box\bxt\bta\bab\bbs\bs (-\b-o\box\bxt\bta\bab\bbs\bs)
+                 Expand (do not expand) tabs to spaces on output.
+
+   L\bLo\boc\bca\bal\bl M\bMo\bod\bde\bes\bs:\b:
+
+     Local mode flags (lflags) affect various and sundry characteristics of
+     terminal processing.  Historically the term "local" pertained to new job
+     control features implemented by Jim Kulp on a Pdp 11/70 at IIASA. Later
+     the driver ran on the first VAX at Evans Hall, UC Berkeley, where the job
+     control details were greatly modified but the structure definitions and
+     names remained essentially unchanged.  The second interpretation of the
+     'l' in lflag is ``line discipline flag'' which corresponds to the _\bc_\b__\bl_\bf_\bl_\ba_\bg
+     of the _\bt_\be_\br_\bm_\bi_\bo_\bs structure.
 
      i\bis\bsi\big\bg (-\b-i\bis\bsi\big\bg)
 
      i\bis\bsi\big\bg (-\b-i\bis\bsi\big\bg)
-              Enable (disable) the checking of characters against the special
-              control characters INTR, QUIT, and SUSP.
+                 Enable (disable) the checking of characters against the spe-
+                 cial control characters INTR, QUIT, and SUSP.
 
      i\bic\bca\ban\bno\bon\bn (-\b-i\bic\bca\ban\bno\bon\bn)
 
      i\bic\bca\ban\bno\bon\bn (-\b-i\bic\bca\ban\bno\bon\bn)
-              Enable (disable) canonical input (ERASE and KILL processing).
+                 Enable (disable) canonical input (ERASE and KILL processing).
 
      i\bie\bex\bxt\bte\ben\bn (-\b-i\bie\bex\bxt\bte\ben\bn)
 
      i\bie\bex\bxt\bte\ben\bn (-\b-i\bie\bex\bxt\bte\ben\bn)
-              Enable (disable) any implementation defined special control
-              characters not currently controlled by icanon, isig, or ixon.
+                 Enable (disable) any implementation defined special control
+                 characters not currently controlled by icanon, isig, or ixon.
 
      e\bec\bch\bho\bo (-\b-e\bec\bch\bho\bo)
 
      e\bec\bch\bho\bo (-\b-e\bec\bch\bho\bo)
-              Echo back (do not echo back) every character typed.
+                 Echo back (do not echo back) every character typed.
 
      e\bec\bch\bho\boe\be (-\b-e\bec\bch\bho\boe\be)
 
      e\bec\bch\bho\boe\be (-\b-e\bec\bch\bho\boe\be)
-              The ERASE character shall (shall not) visually erase the last
-              character in the current line from the display, if possible.
+                 The ERASE character shall (shall not) visually erase the last
+                 character in the current line from the display, if possible.
 
      e\bec\bch\bho\bok\bk (-\b-e\bec\bch\bho\bok\bk)
 
      e\bec\bch\bho\bok\bk (-\b-e\bec\bch\bho\bok\bk)
-              Echo (do not echo) NL after KILL character.
+                 Echo (do not echo) NL after KILL character.
+
+     e\bec\bch\bho\bok\bke\be (-\b-e\bec\bch\bho\bok\bke\be)
+                 The KILL character shall (shall not) visually erase the the
+                 current line from the display, if possible.
 
      e\bec\bch\bho\bon\bnl\bl (-\b-e\bec\bch\bho\bon\bnl\bl)
 
      e\bec\bch\bho\bon\bnl\bl (-\b-e\bec\bch\bho\bon\bnl\bl)
-              Echo (do not echo) NL, even if echo is disabled.
+                 Echo (do not echo) NL, even if echo is disabled.
+
+     e\bec\bch\bho\boc\bct\btl\bl (-\b-e\bec\bch\bho\boc\bct\btl\bl)
+                 If e\bec\bch\bho\boc\bct\btl\bl is set, echo control characters as ^X.  Otherwise
+
+                 control characters echo as themselves.
+
+     e\bec\bch\bho\bop\bpr\brt\bt (-\b-e\bec\bch\bho\bop\bpr\brt\bt)
+                 For printing terminals. If set, echo erased characters back-
+                 wards within ``\'' and ``/''.  Otherwise, disable this fea-
+                 ture.
 
      n\bno\bof\bfl\bls\bsh\bh (-\b-n\bno\bof\bfl\bls\bsh\bh)
 
      n\bno\bof\bfl\bls\bsh\bh (-\b-n\bno\bof\bfl\bls\bsh\bh)
-              Disable (enable) flush after INTR, QUIT, SUSP.
-     c\bco\bon\bnt\btr\bro\bol\bl-\b-c\bch\bha\bar\bra\bac\bct\bte\ber\br _\bs_\bt_\br_\bi_\bn_\bg
-              Set control-character to string.  If string is a single
-              character, the control character is set to that character.  If
-              string is the two character sequence "^-" or the string "undef"
-              the control character is set to {_POSIX_VDISABLE} if it is in
-              effect for the device; if {_POSIX_VDISABLE} is not in effect
-              for the device, it is an error.
-
-              Recognized control-characters:
-
-                    control-     POSIX.1
-                    character    Subscript    Description
-                    _________    _________    _______________
-                    eof          VEOF         EOF character
-                    eol          VEOL         EOL character
-                    erase        VERASE       ERASE character
-                    intr         VINTR        INTR character
-                    kill         VKILL        KILL character
-                    quit         VQUIT        QUIT character
-                    susp         VSUSP        SUSP character
-                    start        VSTART       START character
-                    stop         VSTOP        STOP character
-
-     s\bsa\bav\bve\bed\bd s\bse\bet\btt\bti\bin\bng\bgs\bs
-              Set the current terminal characteristics to the saved settings
-              produced by the -g option.
+                 Disable (enable) flush after INTR, QUIT, SUSP.
+
+     t\bto\bos\bst\bto\bop\bp (-\b-t\bto\bos\bst\bto\bop\bp)
+                 Send (do not send) SIGTTOU for background output.  This caus-
+                 es background jobs to stop if they attempt terminal output.
+
+     a\bal\blt\btw\bwe\ber\bra\bas\bse\be (-\b-a\bal\blt\btw\bwe\ber\bra\bas\bse\be)
+                 Use (do not use) an alternate word erase algorithm when pro-
+                 cessing WERASE characters.  This alternate algorithm consid-
+                 ers sequences of alphameric/underscores as words.  It also
+                 skips the first preceding character in its classification (as
+                 a convenience since the one preceding character could have
+                 been erased with simply an ERASE character.)
+
+     m\bmd\bdm\bmb\bbu\buf\bf (-\b-m\bmd\bdm\bmb\bbu\buf\bf)
+                 If set, flow control output based on condition of Carrier De-
+                 tect.  Otherwise writes return an error if Carrier Detect is
+                 low (and Carrier is not being ignored with the CLOCAL flag.)
+
+     f\bfl\blu\bus\bsh\bho\bo (-\b-f\bfl\blu\bus\bsh\bho\bo)
+                 Indicates output is (is not) being discarded.
+
+     p\bpe\ben\bnd\bdi\bin\bn (-\b-p\bpe\ben\bnd\bdi\bin\bn)
+                 Indicates input is (is not) pending after a switch from non-
+                 canonical to canonical mode and will be re-input when a read
+                 becomes pending or more input arrives.
+
+   C\bCo\bon\bnt\btr\bro\bol\bl C\bCh\bha\bar\bra\bac\bct\bte\ber\brs\bs:\b:
+
+     _\bc_\bo_\bn_\bt_\br_\bo_\bl_\b-_\bc_\bh_\ba_\br_\ba_\bc_\bt_\be_\br _\bs_\bt_\br_\bi_\bn_\bg
+                 Set _\bc_\bo_\bn_\bt_\br_\bo_\bl_\b-_\bc_\bh_\ba_\br_\ba_\bc_\bt_\be_\br to _\bs_\bt_\br_\bi_\bn_\bg. If string is a single char-
+                 acter, the control character is set to that character.  If
+                 string is the two character sequence "^-" or the string "un-
+                 def" the control character is disabled (i.e. set to
+                 {_POSIX_VDISABLE}.)
+
+                 Recognized control-characters:
+
+
+                       control-
+                       character    Subscript    Description
+                       _________    _________    _______________
+                       eof          VEOF         EOF character
+                       eol          VEOL         EOL character
+                       eol2         VEOL2        EOL2 character
+                       erase        VERASE       ERASE character
+                       werase       VWERASE      WERASE character
+                       intr         VINTR        INTR character
+                       kill         VKILL        KILL character
+                       quit         VQUIT        QUIT character
+                       susp         VSUSP        SUSP character
+                       start        VSTART       START character
+                       stop         VSTOP        STOP character
+                       dsusp        VDSUSP       DSUSP character
+                       lnext        VLNEXT       LNEXT character
+                       reprint      VREPRINT     REPRINT character
+                       status       VSTATUS      STATUS character
+
 
      m\bmi\bin\bn _\bn_\bu_\bm_\bb_\be_\br
 
      m\bmi\bin\bn _\bn_\bu_\bm_\bb_\be_\br
-              time number Set the value of min or time to number.  MIN and
-              TIME are used in Non-Canonical mode input processing (-icanon).
+
+     t\bti\bim\bme\be _\bn_\bu_\bm_\bb_\be_\br
+                 Set the value of min or time to number.  MIN and TIME are
+                 used in Non-Canonical mode input processing (-icanon).
+
+   C\bCo\bom\bmb\bbi\bin\bna\bat\bti\bio\bon\bn M\bMo\bod\bde\bes\bs:\b:
+
+     _\bs_\ba_\bv_\be_\bd _\bs_\be_\bt_\bt_\bi_\bn_\bg_\bs
+                 Set the current terminal characteristics to the saved set-
+                 tings produced by the -\b-g\bg option.
 
      e\bev\bve\ben\bnp\bp or p\bpa\bar\bri\bit\bty\by
 
      e\bev\bve\ben\bnp\bp or p\bpa\bar\bri\bit\bty\by
-              Enable parenb and cs7; disable parodd.
+                 Enable parenb and cs7; disable parodd.
 
 
-     o\bod\bdd\bdp\bp      Enable parenb, cs7, and parodd.
+     o\bod\bdd\bdp\bp        Enable parenb, cs7, and parodd.
 
      -\b-p\bpa\bar\bri\bit\bty\by, -\b-e\bev\bve\ben\bnp\bp, -\b-o\bod\bdd\bdp\bp
 
      -\b-p\bpa\bar\bri\bit\bty\by, -\b-e\bev\bve\ben\bnp\bp, -\b-o\bod\bdd\bdp\bp
-              Disable parenb, and set cs8.
+                 Disable parenb, and set cs8.
+
+     n\bnl\bl (-\b-n\bnl\bl)    Enable (disable) icrnl.  In addition -nl unsets inlcr and
+                 igncr.
+
+     e\bek\bk          Reset ERASE and KILL characters back to system defaults.
+
+     s\bsa\ban\bne\be        Resets all modes to reasonable values for interactive termi-
+                 nal use.
+
+     t\btt\bty\by         Set the line discipline to the standard terminal line disci-
+                 pline TTYDISC.
+
+     c\bcr\brt\bt (-\b-c\bcr\brt\bt)  Set (disable) all modes suitable for a CRT display device.
+
+     k\bke\ber\brn\bni\bin\bnf\bfo\bo (-\b-k\bke\ber\brn\bni\bin\bnf\bfo\bo)
+                 Enable (disable) the system generated status line associated
+                 with processing a STATUS character (usually set to ^T).  The
+                 status line consists of the system load average, the current
+                 command name, its process ID, the event the process is wait-
+                 ing on (or the status of the process), the user and system
+                 times, percent cpu, and current memory usage.
+
+     c\bco\bol\blu\bum\bmn\bns\bs _\bn_\bu_\bm_\bb_\be_\br
+                 The terminal size is recorded as having _\bn_\bu_\bm_\bb_\be_\br columns.
+
+     c\bco\bol\bls\bs _\bn_\bu_\bm_\bb_\be_\br
+                 is an alias for c\bco\bol\blu\bum\bmn\bns\bs.\b.
+
+     r\bro\bow\bws\bs _\bn_\bu_\bm_\bb_\be_\br
+                 The terminal size is recorded as having _\bn_\bu_\bm_\bb_\be_\br rows.
+
+     d\bde\bec\bc         Set modes suitable for users of Digital Equipment Corporation
+                 systems ( ERASE, KILL, and INTR characters are set to ^?, ^U,
+                 and ^C; ixany is disabled, and crt is enabled.)
+
+     e\bex\bxt\btp\bpr\bro\boc\bc (-\b-e\bex\bxt\btp\bpr\bro\boc\bc)
+                 If set, this flag indicates that some amount of terminal pro-
+                 cessing is being performed by either the terminal hardware or
+                 by the remote side connected to a pty.
 
 
-     n\bnl\bl (-\b-n\bnl\bl)
-              Enable (disable) icrnl.  In addition -nl unsets inlcr and
-              igncr.
+     r\bra\baw\bw (-\b-r\bra\baw\bw)  If set, change the modes of the terminal so that no input or
+                 output processing is performed. If unset, change the modes of
+                 the terminal to some reasonable state that performs input and
+                 output processing.  Note that since the terminal driver no
+                 longer has a single RAW bit, it is not possible to intuit
+                 what flags were set prior to setting r\bra\baw\bw. This means that un-
+                 setting r\bra\baw\bw may not put back all the setting that were previ-
+                 ously in effect.  To set the terminal into a raw state and
+                 then accurately restore it, the following shell code is rec-
+                 ommended:
 
 
-     e\bek\bk        Reset ERASE and KILL characters back to system defaults.
+                 save_state=$(stty -g)
+                 stty raw
+                 ...
+                 stty "$save_state"
 
 
-     s\bsa\ban\bne\be      Resets all modes to some reasonable, unspecified, values.
 
 
-     If the -g option is specified, stty writes to standard output the current
-     settings in a form that can be used as arguments to another instance of
-     stty on the same system.
+     s\bsi\biz\bze\be        The size of the terminal is printed as two numbers on a sin-
+                 gle line, first rows, then columns.
 
 
-     If the -a option is specified, all of the information as described in ar-
-     guments is written to standard output.  Unless otherwise specified, this
-     information shall be displayed as <space>-separated tokens in an unspeci-
-     fied format, on one or more lines, with an unspecified number of tokens
-     per line. Additional information may be displayed as well.
+   C\bCo\bom\bmp\bpa\bat\bta\bab\bbi\bil\bli\bit\bty\by M\bMo\bod\bde\bes\bs:\b:
 
 
-     If no options are specified, an unspecified subset of the information
-     displayed for the -a option is displayed.
+     These modes remain for compatability with the previous version of the
+     stty command.
 
 
-     If the terminal input speed and output speed are the same, the speed in-
-     formation is displayed as follows:
+     a\bal\bll\bl         Reports all the terminal modes as with s\bst\btt\bty\by -\b-a\ba except that
+                 the control characters are printed in a columnar format.
 
 
-          "speed %d baud;", <speed>
+     e\bev\bve\ber\bry\byt\bth\bhi\bin\bng\bg  Same as a\bal\bll\bl.
 
 
+     c\bco\boo\bok\bke\bed\bd      Same as s\bsa\ban\bne\be.
 
 
-     Otherwise speeds are displayed as:
+     c\bcb\bbr\bre\bea\bak\bk      If set, enables b\bbr\brk\bki\bin\bnt\bt, i\bix\bxo\bon\bn, i\bim\bma\bax\bxb\bbe\bel\bl, o\bop\bpo\bos\bst\bt, i\bis\bsi\big\bg, i\bie\bex\bxt\bte\ben\bn,
+                 and -\b-i\bic\bca\ban\bno\bon\bn. If unset, same as s\bsa\ban\bne\be.
 
 
-          "ispeed %d baud; ospeed %d baud;", <ispeed>, <ospeed>
+     n\bne\bew\bw         Same as t\btt\bty\by.
 
 
-     Control characters are displayed as:
+     o\bol\bld\bd         Same as t\btt\bty\by.
 
 
-          "%s = %s;", <control-character name>, <value>
+     n\bne\bew\bwc\bcr\brt\bt (-\b-n\bne\bew\bwc\bcr\brt\bt)
+                 Same as c\bcr\brt\bt.
 
 
-     where value is either the character, or some visual representation of the
-     character if it is non-printing, or the string "<undef>" if the character
-     is disabled.
+     p\bpa\bas\bss\bs8\b8       The converse of p\bpa\bar\bri\bit\bty\by.
 
 
-     The s\bst\btt\bty\by utility exits with one of the following values:
+     t\bta\ban\bnd\bde\bem\bm (-\b-t\bta\ban\bnd\bde\bem\bm)
+                 Same as i\bix\bxo\bof\bff\bf.
 
 
-     0    The terminal options were read or set successfully.
+     d\bde\bec\bcc\bct\btl\blq\bq (-\b-d\bde\bec\bcc\bct\btl\blq\bq)
+                 The converse of i\bix\bxa\ban\bny\by.
 
 
-     >0    An error occurred.
+     c\bcr\brt\bte\ber\bra\bas\bse\be (-\b-c\bcr\brt\bte\ber\bra\bas\bse\be)
+                 Same as e\bec\bch\bho\boe\be.
+
+     c\bcr\brt\btb\bbs\bs (-\b-c\bcr\brt\btb\bbs\bs)
+                 Same as e\bec\bch\bho\boe\be.
+
+     c\bcr\brt\btk\bki\bil\bll\bl (-\b-c\bcr\brt\btk\bki\bil\bll\bl)
+                 Same as e\bec\bch\bho\bok\bke\be.
+
+     c\bct\btl\ble\bec\bch\bho\bo (-\b-c\bct\btl\ble\bec\bch\bho\bo)
+                 Same as e\bec\bch\bho\boc\bct\btl\bl.
+
+     p\bpr\brt\bte\ber\bra\bas\bse\be (-\b-p\bpr\brt\bte\ber\bra\bas\bse\be)
+                 Same as e\bec\bch\bho\bop\bpr\brt\bt.
+
+     l\bli\bit\bto\bou\but\bt (-\b-l\bli\bit\bto\bou\but\bt)
+                 The converse of o\bop\bpo\bos\bst\bt.
+
+     t\bta\bab\bbs\bs (-\b-t\bta\bab\bbs\bs)
+                 The converse of t\bta\bab\bbs\bs.
+
+
+     b\bbr\brk\bk _\bv_\ba_\bl_\bu_\be   Same as the control character e\beo\bol\bl.
+
+     f\bfl\blu\bus\bsh\bh _\bv_\ba_\bl_\bu_\be
+                 Same as the control character d\bdi\bis\bsc\bca\bar\brd\bd.
+
+     r\brp\bpr\brn\bnt\bt _\bv_\ba_\bl_\bu_\be
+                 Same as the control character r\bre\bep\bpr\bri\bin\bnt\bt.
+
+     The s\bst\btt\bty\by utility exits with a value of 0 if successful, and >0 if an er-
+     ror occurs.
 
 S\bSE\bEE\bE A\bAL\bLS\bSO\bO
 
 S\bSE\bEE\bE A\bAL\bLS\bSO\bO
-     stty(4)
+     termios(4)
 
 S\bST\bTA\bAN\bND\bDA\bAR\bRD\bDS\bS
 
 S\bST\bTA\bAN\bND\bDA\bAR\bRD\bDS\bS
-     The s\bst\btt\bty\by function is expected to be POSIX 1003.2 compatible.
+     The s\bst\btt\bty\by function is expected to be IEEE Std1003.2 (``POSIX'') compati-
+     ble.  The flags -\b-e\be and -\b-f\bf are extensions to the standard.
+
+4.4BSD                           May 31, 1993                                7