Hacker News new | ask | show | jobs
by tbrownaw 56 days ago
There's been plenty of times that I catted a binary file and broke my terminal settings. Sometimes fixable by running `clear` (without being able to see what I'm typing), sometimes not.

And I know PuTTY has a setting for what string is returned in response to some control code, that iirc per standard can be set from some other code.

.

In general, in-band signaling allows for "fun" tricks.

.

+++

2 comments

> Sometimes fixable by running `clear` (without being able to see what I'm typing), sometimes not.

Two tips, if I may: Ctrl-l is easier to type. And `reset` is equally hard to type on a broken terminal, but more effective.

Stty sane has also got me out of this hole many times
Ask me how I know what “tput reset” does.