Manual Pages for UNIX Darwin command on man stty
MyWebUniversity

Manual Pages for UNIX Darwin command on man stty

STTY(1) BSD General Commands Manual STTY(1)

NAME

ssttttyy - set the options for a terminal device interface

SYNOPSIS

ssttttyy [-aa | -ee | -gg] [-ff file] [operands]

DESCRIPTION

The ssttttyy utility sets or reports on terminal characteristics for the

device 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:

-aa Display all the current settings for the terminal to standard

output as per IEEE Std 1003.2 (``POSIX.2'').

-ee Display all the current settings for the terminal to standard

output in the traditional BSD ``all'' and ``everything'' formats.

-ff Open and use the terminal named by file rather than using stan-

dard input. The file is opened using the ONONBLOCK flag of

ooppeenn(), making it possible to set or display settings on a termi-

nal that might otherwise block on the open.

-gg 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 ssttttyy to restore the current terminal state as per IEEE Std 1003.2 (``POSIX.2'').

The following arguments are available to set the terminal characteris-

tics: CCoonnttrrooll MMooddeess:: Control mode flags affect hardware characteristics associated with the terminal. This corresponds to the ccflag in the termios structure.

ppaarreennbb (-ppaarreennbb)

Enable (disable) parity generation and detection.

ppaarroodddd (-ppaarroodddd)

Select odd (even) parity. ccss55 ccss66 ccss77 ccss88 Select character size, if possible. number Set terminal baud rate to the number given, if possible. If the baud rate is set to zero, modem control is no longer asserted. iissppeeeedd number

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. oossppeeeedd number

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. ssppeeeedd number This sets both iissppeeeedd and oossppeeeedd to number.

hhuuppccll (-hhuuppccll)

Stop asserting modem control (do not stop asserting modem control) on last close.

hhuupp (-hhuupp) Same as hupcl (-hhuuppccll).

ccssttooppbb (-ccssttooppbb)

Use two (one) stop bits per character.

ccrreeaadd (-ccrreeaadd)

Enable (disable) the receiver.

ccllooccaall (-ccllooccaall)

Assume a line without (with) modem control.

ccrrttssccttss (-ccrrttssccttss)

Enable (disable) RTS/CTS flow control. IInnppuutt MMooddeess:: This corresponds to the ciflag in the termios structure.

iiggnnbbrrkk (-iiggnnbbrrkk)

Ignore (do not ignore) break on input.

bbrrkkiinntt (-bbrrkkiinntt)

Signal (do not signal) INTR on break.

iiggnnppaarr (-iiggnnppaarr)

Ignore (do not ignore) characters with parity errors.

ppaarrmmrrkk (-ppaarrmmrrkk)

Mark (do not mark) characters with parity errors.

iinnppcckk (-iinnppcckk)

Enable (disable) input parity checking.

iissttrriipp (-iissttrriipp)

Strip (do not strip) input characters to seven bits.

iinnllccrr (-iinnllccrr)

Map (do not map) NL to CR on input.

iiggnnccrr (-iiggnnccrr)

Ignore (do not ignore) CR on input.

iiccrrnnll (-iiccrrnnll)

Map (do not map) CR to NL on input.

iixxoonn (-iixxoonn)

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 iixxaannyy is set, any char-

acter restarts output.

iixxooffff (-iixxooffff)

Request that the system send (not send) START/STOP characters when the input queue is nearly empty/full.

iixxaannyy (-iixxaannyy)

Allow any character (allow only START) to restart output.

iimmaaxxbbeell (-iimmaaxxbbeell)

The system imposes a limit of MAXINPUT (currently 255) char-

acters in the input queue. If iimmaaxxbbeell 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 iimmaaxxbbeell is unset and the input queue is full, the next input character causes the entire input and output queues to be discarded. OOuuttppuutt MMooddeess:: This corresponds to the coflag of the termios structure.

ooppoosstt (-ooppoosstt)

Post-process output (do not post-process output; ignore all

other output modes).

oonnllccrr (-oonnllccrr)

Map (do not map) NL to CR-NL on output.

ooccrrnnll (-ooccrrnnll)

Map (do not map) CR to NL on output.

ooxxttaabbss (-ooxxttaabbss)

Expand (do not expand) tabs to spaces on output.

oonnooccrr (-oonnooccrr)

Do not (do) output CRs at column zero.

oonnllrreett (-oonnllrreett)

On the terminal NL performs (does not perform) the CR func-

tion. LLooccaall MMooddeess:: 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 clflag of the termios structure.

iissiigg (-iissiigg)

Enable (disable) the checking of characters against the spe-

cial control characters INTR, QUIT, and SUSP.

iiccaannoonn (-iiccaannoonn)

Enable (disable) canonical input (ERASE and KILL processing).

iieexxtteenn (-iieexxtteenn)

Enable (disable) any implementation defined special control characters not currently controlled by icanon, isig, or ixon.

eecchhoo (-eecchhoo)

Echo back (do not echo back) every character typed.

eecchhooee (-eecchhooee)

The ERASE character shall (shall not) visually erase the last character in the current line from the display, if possible.

eecchhookk (-eecchhookk)

Echo (do not echo) NL after KILL character.

eecchhookkee (-eecchhookkee)

The KILL character shall (shall not) visually erase the cur-

rent line from the display, if possible.

eecchhoonnll (-eecchhoonnll)

Echo (do not echo) NL, even if echo is disabled.

eecchhooccttll (-eecchhooccttll)

If eecchhooccttll is set, echo control characters as ^X. Otherwise control characters echo as themselves.

eecchhoopprrtt (-eecchhoopprrtt)

For printing terminals. If set, echo erased characters back-

wards within ``\'' and ``/''. Otherwise, disable this fea-

ture.

nnooffllsshh (-nnooffllsshh)

Disable (enable) flush after INTR, QUIT, SUSP.

ttoossttoopp (-ttoossttoopp)

Send (do not send) SIGTTOU for background output. This

causes background jobs to stop if they attempt terminal out-

put.

aallttwweerraassee (-aallttwweerraassee)

Use (do not use) an alternate word erase algorithm when pro-

cessing WERASE characters. This alternate algorithm consid-

ers sequences of alphanumeric/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.)

mmddmmbbuuff (-mmddmmbbuuff)

If set, flow control output based on condition of Carrier Detect. Otherwise writes return an error if Carrier Detect is low (and Carrier is not being ignored with the CLOCAL flag.)

fflluusshhoo (-fflluusshhoo)

Indicates output is (is not) being discarded.

ppeennddiinn (-ppeennddiinn)

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. CCoonnttrrooll CChhaarraacctteerrss::

control-character string

Set control-character to string. 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

"undef" the control character is disabled (i.e. set to {POSIXVDISABLE}.)

Recognized control-characters:

control-

character Subscript Description eof VEOF EOF character eol VEOL EOL character eol2 VEOL2 EOL2 character erase VERASE ERASE character erase2 VERASE2 ERASE2 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 mmiinn number ttiimmee number Set the value of min or time to number. MIN and TIME are

used in Non-Canonical mode input processing (-icanon).

CCoommbbiinnaattiioonn MMooddeess:: saved settings

Set the current terminal characteristics to the saved set-

tings produced by the -gg option.

eevveennpp or ppaarriittyy Enable parenb and cs7; disable parodd. ooddddpp Enable parenb, cs7, and parodd.

-ppaarriittyy, -eevveennpp, -ooddddpp

Disable parenb, and set cs8.

nnll (-nnll) Enable (disable) icrnl. In addition -nl unsets inlcr and

igncr. eekk Reset ERASE, ERASE2, and KILL characters back to system defaults.

ssaannee Resets all modes to reasonable values for interactive termi-

nal use.

ttttyy Set the line discipline to the standard terminal line disci-

pline TTYDISC.

ccrrtt (-ccrrtt) Set (disable) all modes suitable for a CRT display device.

kkeerrnniinnffoo (-kkeerrnniinnffoo)

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. ccoolluummnnss number The terminal size is recorded as having number columns. ccoollss number is an alias for ccoolluummnnss. rroowwss number The terminal size is recorded as having number rows. ddeecc 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.)

eexxttpprroocc (-eexxttpprroocc)

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.

rraaww (-rraaww) 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 rraaww. This means that

unsetting rraaww may not put back all the setting that were pre-

viously in effect. To set the terminal into a raw state and

then accurately restore it, the following shell code is rec-

ommended:

savestate=$(stty -g)

stty raw

...

stty "$savestate"

ssiizzee The size of the terminal is printed as two numbers on a sin-

gle line, first rows, then columns. CCoommppaattiibbiilliittyy MMooddeess:: These modes remain for compatibility with the previous version of the ssttttyy command.

aallll Reports all the terminal modes as with ssttttyy -aa except that

the control characters are printed in a columnar format. eevveerryytthhiinngg Same as aallll. ccooookkeedd Same as ssaannee. ccbbrreeaakk If set, enables bbrrkkiinntt, iixxoonn, iimmaaxxbbeell, ooppoosstt, iissiigg, iieexxtteenn,

and -iiccaannoonn. If unset, same as ssaannee.

nneeww Same as ttttyy. oolldd Same as ttttyy.

nneewwccrrtt (-nneewwccrrtt)

Same as ccrrtt. ppaassss88 The converse of ppaarriittyy.

ttaannddeemm (-ttaannddeemm)

Same as iixxooffff.

ddeeccccttllqq (-ddeeccccttllqq)

The converse of iixxaannyy.

ccrrtteerraassee (-ccrrtteerraassee)

Same as eecchhooee.

ccrrttbbss (-ccrrttbbss)

Same as eecchhooee.

ccrrttkkiillll (-ccrrttkkiillll)

Same as eecchhookkee.

ccttlleecchhoo (-ccttlleecchhoo)

Same as eecchhooccttll.

pprrtteerraassee (-pprrtteerraassee)

Same as eecchhoopprrtt.

lliittoouutt (-lliittoouutt)

The converse of ooppoosstt.

ttaabbss (-ttaabbss)

The converse of ooxxttaabbss. bbrrkk value Same as the control character eeooll. fflluusshh value Same as the control character ddiissccaarrdd. rrpprrnntt value Same as the control character rreepprriinntt. DIAGNOSTICS The ssttttyy utility exits 0 on success, and >0 if an error occurs.

SEE ALSO

termios(4) STANDARDS

The ssttttyy utility is expected to be IEEE Std 1003.2 (``POSIX.2'') compati-

ble. The flags -ee and -ff are extensions to the standard.

BSD April 18, 1994 BSD




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™