I recently switched to a new machine, and I'm noticing a behavior in iTerm2 I haven't seen before. Whenever I paste text into iTerm2, the text is highlighted:
enter image description here

Here, I pasted "err". Why is this, and what is it signifying?

2 Answers 2


There is nothing to worry about. If you just click the space and then delete button. The highlight disappears as soon as you do this and whatever has been pasted will run.

Let me know if it is ok.

Thank You!

  • Dhruva, thanks - I haven't found any differences to without the highlights, so looks so far to be purely aesthetic to me. But is there a setting to turn this off?
    – rishai
    Jan 25, 2021 at 7:51
  • i guess not... need to check on that Jan 25, 2021 at 9:20
  • Upon further testing, it seems this only happens in the Python interpreter, and it's not specific to iTem2. I wonder why the Python REPL has this somewhat unusual behavior.
    – rishai
    Jan 26, 2021 at 8:01

This is a new "default setting" in Bash 5.1. You can get rid of it if you want by adding to ~/.inputrc:

set enable-bracketed-paste off

It does actually provide some security benefit and is documented here: https://www.gnu.org/software/bash/manual/bash.html

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .