Shell integration breaks cat + tab + backspace
Start a cat
. In the first line, press Tab followed by Backspace, or type a letter or two and then press Tab then Backspace, or anything similar.
Notice that backspacing does totally unexpected things.
It's broken both in iTerm2 and in Terminal.app, but only when shell integration is installed, and only in the first input line into each cat
, line editing is okay in subsequent lines.
I think shell integration prints some escape sequence that doesn't change the cursor's actual position, but breaks the kernel's idea about where the cursor is, which in turn emits the wrong number of backspaces to retreat the cursor.