установить параметры для терминала (set the options for a terminal)
Использование в приложениях (Application usage)
The -g
flag is designed to facilitate the saving and restoring of
terminal state from the shell level. For example, a program may:
saveterm="$(stty -g)" # save terminal state
stty (new settings) # set new state
... # ...
stty $saveterm # restore terminal state
Since the format is unspecified, the saved value is not portable
across systems.
Since the -a
format is so loosely specified, scripts that save
and restore terminal settings should use the -g
option.