Skip to main content

SHTTYINFO

Static SHTTYINFO 

Source
pub static SHTTYINFO: Mutex<Option<termios>>
Expand description

Port of void gettyinfo(struct ttyinfo *ti) from Src/utils.c:1746.

The saved baseline terminal mode — C’s struct ttyinfo shttyinfo (Src/init.c). Captured ONCE while the terminal is still in its original (cooked / canonical) mode, before ZLE ever puts it into raw mode via zsetterm(). trashzle() restores this baseline via settyinfo(&shttyinfo) so that external commands the user runs (cat, less, …) execute with a cooked terminal — where ^D is EOF, ^C is SIGINT, and line editing works. Without it the tty stayed in ZLE raw mode across command execution, so cat never saw EOF on ^D.