1

On a specific shell (bash) I somehow managed to have my clipboard content be surrounded by a 0~ prefix and ~1 suffix.

That is, I copy Spanish Inquisi... oops sorry Spanish Democracy, I get pasted: 0~Spanish Democracy~1. Independently of the copy/paste technique, either by Ctrl+Shift+C/Ctrl+Shift+V or selection + mouse-wheel.

I was curious to understand how that happened, and how that could be reverted.

12
  • Are you saying that doesn't happen in a different shell like sh?
    – dessert
    Nov 3, 2017 at 8:38
  • 1
    That's a bug in Trusty's VTE package. For details see e.g. bugs.launchpad.net/ubuntu/+source/vte/+bug/1350334 or search for "bracketed paste mode" combined with "gnome-terminal" or "vte".
    – egmont
    Nov 3, 2017 at 10:12
  • Which terminal emulator do you use?
    – dessert
    Nov 3, 2017 at 10:24
  • printf "\e[?2004l" seems to be the simple workaround, maybe add this to your ~/.bashrc?
    – dessert
    Nov 3, 2017 at 10:29
  • 1
    The special characters are definitely related to "bracketed paste mode", and there used to be a bug in VTE handling them (which was known to be triggered by Midnight Commander, but probably that's not the only use case of hitting this problem). It would be great if you could share further details with us: Which version of Ubuntu, which version of the terminal emulator (and VTE in turn), and what do you do exactly?
    – egmont
    Nov 3, 2017 at 17:25

0

You must log in to answer this question.

Browse other questions tagged .