12

Since upgrading to Ubuntu 16.10 from 16.04, every time I paste text into a terminal running zsh, that text is highlighted until I type another character. It doesn't seem to matter which terminal emulator I use (it happens both in gnome-terminal and terminator), all that seems to matter is that zsh is the shell (bash does not have the problem). How can I prevent this?

3
  • Can you provide a screenshot ? I can't reproduce what you're reporting. My pastes aren't highlighted at all, cursor positioned at the end Nov 9 '16 at 3:17
  • I can't reproduce it either on 16.04 (when I paste, the cursor goes to the end and nothing is highlighted) Nov 9 '16 at 3:53
  • 1
    Thanks for looking into it. As it turns out, the problem seems to be specific to zsh. Will update the question to reflect this. Nov 9 '16 at 3:57
16

Finally found it (https://github.com/zsh-users/zsh-syntax-highlighting/issues/349):

zle_highlight+=(paste:none)
2
  • where should that go? Also the downsides are not clear to me Mar 3 '20 at 14:09
  • OK, found out: should go in ~/.zshrc (like setopt interactivecomments and others) Mar 3 '20 at 14:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.