3 ms·
If you use fish, that should never happen. (If it happens, we would consider it a bug.)
by ComputerGuru 3y ago
If you use fish, that should never happen. (If it happens, we would consider it a bug.)
- dgl 3y ago(Author here.) Unsure how fish can fully protect from this, as if you run "cat" in fish, then it isn't between you and the terminal anymore? Or do you mean fish should do a reset before displaying each prompt? If I run the printf commands from the "flash.c" example in fish I end up with a messed up terminal.
- ComputerGuru 3y agofish maintains its own tty state and pushes/pops it each time control is returned to fish or fish shells out to another process.
- dgl 3y agoThat's still only best effort, for example it will depend on the terminal but it doesn't reset things like xterm's control keys send escape sequences property, so: printf "\e]4;1;?\a\e[>4;2m" In xterm+fish will result in a messed up shell which you can't escape from (as ^C to clear the input doesn't work anymore).
- ComputerGuru 3y agoCorrect, it only handles prevents the basic kind of borked that can be reset with `stty sane` or `stty reset`.