# Interactive: a prompt carrying sequences that are not just SGR. # # A terminal title (OSC, ended by BEL) and the charset reset plus colour # that `tput sgr0` writes (`ESC ( B ESC [ m`) both come from a terminal's # terminfo entry, and a prompt copied from elsewhere is full of them. # None of them takes a column, so the line scrolls where a plain prompt # of the same width would: a width rule that knows only `ESC [ ... m` # counts the title and the `(B` as text, keeps 7 columns too few, and the # redraw after ^A shows a shorter window than this expectation. command -v python3 >/dev/null 2>&1 || exit 77 python3 "$TESTS/tools/ptydrive.py" -c 16 "$TSH" <<'END' send PS1='\\e]0;t\x07\\e(B\\e[1;32mP\\e[0m> '\r expect P> send abcdefghijklmn send \x01 send X expect Xabcdefghijk send \x03 expect P> send exit\r END