Prevent "^C" from being printed when aborting editing current prompt

Posted by blueyed on Super User See other posts from Super User or by blueyed
Published on 2010-05-30T00:45:38Z Indexed on 2010/05/30 0:53 UTC
Read the original article Hit count: 265

Filed under:
|

When you're editing a prompt in bash, and then press Ctrl-C to abort it, "^C" might get printed where the cursor has been.

When you were in the middle of the line, this makes copy'n'pasting more difficult and IIRC it can be configured to not display it (and overwrite parts of the command line).

I do not have this problem myself (using zsh, which does not print "^C"), but ran across this in a Konsole bug report.

© Super User or respective owner

Related posts about bash

Related posts about prompt