|
|
|
|
|
by gnachman
1180 days ago
|
|
iTerm2 has code to detect when the current host changes and then disables paste bracketing. An ssh session suddenly ending is a common cause of it being left on with annoying consequences. After sending a bracketed paste, iTerm2 watches for half a second for `00~` to be echoed back and then offers to turn paste bracketing off for you. Every modal reporting feature has similar problems: mouse reporting and focus reporting, in particular. |
|
I've hit that with mouse reporting. Now that you mention it, seems like one way to address this would be the ssh client sending the ANSI escape sequences to turn off these features on exit. I wonder if the openssh developers would be open to doing so. It also seems possible to wrap ssh in a tiny shell/whatever script that calls ssh, saves the exit status, prints these disable codes, and returns the original exit status.