stty

command
v7.0.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 31, 2020 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Overview

The command works like this: stty [verb] [options] Verbs are: dump -- dump the json of the struct to stdout load -- read a json file from stdin and use it to set raw -- convenience command to set raw cooked -- convenience command to set cooked In common stty usage, options may be specified without a verb.

any other verb, with a ~ or without, is taken to mean standard stty args, e.g. stty ~echo turns off echo. Flags with arguments work too: stty intr 1 sets the interrupt character to ^A.

The JSON encoding lets you do things like this: stty dump | sed whatever > file stty load file Further, one can easily push and pop state in by storing the current state in a file in JSON, making changes, and restoring it later. This has always been inconvenient in standard stty.

While GNU stty can do some of this, its way of doing it is harder to read and not as portable, since the format they use is not self-describing: stty -g 4500:5:bf:8a3b:3:1c:7f:15:4:0:1:0:11:13:1a:0:12:f:17:16:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0

We always do our operations on fd 0, as that is standard, and we always do an initial termios.GTTY to ensure we have access to fd 0.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL