Extraneous characters when pasting text

Whenever I attempt to past plain text it sometimes adds ^[[200~ to the start and a ~ to the end. Can this be disabled. It’s annoying .

I use

Ctrl+Shift+V

It’s works..

1 Like

I get this in the command line at seemingly random times.

To paste into the command line I use, as Oleksandr said, Ctrl+Shift+v (or else it won’t work with regular ctrl+v). Sometimes this method makes the ^[[200~ and sometimes it does not.

I’m on Sway WM with Foot terminal.

In my QTerminal (OS = LXQT) it works always.

I think your terminal has switched for whatever reason to bracketed paste mode.
To leave this mode, execute in this terminal: echo -e '\033[?2004l'

Refs:

2 Likes

good for you!

I’m not aware I switched anything. This seems to be the default on Fedora Budgie (?)

Some ways bracketed paste mode gets enabled are mentioned in https://askubuntu.com/questions/662222/why-bracketed-paste-mode-is-enabled-sporadically-in-my-terminal-screen from 10 years ago.

You must have typed the terminal quote character before managing to paste, which defualts to Ctrl-V.

The ^[[200~ is a marker that tells a terminal APP that you are pasting from the clipboard and not typing.

If you paste bash will highlight the pasted text.