I have a problem with command editing in bash. If all of the following are true...My (single-line) prompt is particularly long.The terminal window is relatively narrow.I pressed Ctrl+C to exit the previous process, so that ^C is displayed at the left of the line.The command I'm editing wraps to the next line....then the editing is messed up. I end up replacing characters offset by 2 positions from the ones I thought I was editing.Similar things happen if, at step 4, I type in a command that spans multiple lines (rather than pressing Up). I can backspace onto the previous line, and then delete two characters of my prompt.Basically this:(Some output)^Cuser@host:~/path/to/somewhere $ some long commandthat wrapsIs broken by the ^C that appears at the start of the line.I've tried some other commands (e.g. sleep 30), and the ^C appears on a line by itself, and the prompt appears on the next line. This only seems to happen with node.js: node some_command_that_wraps.js.In case it's important, I have a brightly-coloured, git-integrated PROMPT_COMMAND. You can find it on github, in case I've done something stupid in that.UpdateMy PS1 is (for example) set to (I've wrapped it slightly):\[\e]0;\u@\h:\w\a\]\[\e[0;93m\]\u@\h\[\e[0;96m\]:\w \[\e[0;97m\]{\[\e[0;94m\]master\[\e[0;92m\]\[\e[0;91m\] ~1\[\e[0;97m\]}\[\e[0m\]\[\e[0;96m\]\$\[\e[0m\]...which displays (with more colour):roger@roger-p5q:~/Source/rlipscombe/bash_profile [master ~1] $ As far as I can tell, the escape characters are correctly non-countable (using \[ .. \]).How do I either:Get bash to detect the ^C and move to the next line?, orNot mess up the command editing?
^C characters at start of line break bash command editing
bash