If you work a lot in a shell like I do, then you will definitely know the problem where you accidently paste multiple lines to the shell and it will try to execute every single line as a command.

This could look like in the following image when pasting a simle multiline text:

Imagine if you were accidently pasting a few lines from a linux manual that describes how to delete files or some other command. This could go terrible wrong.

The Fix

OK so luckily there is a very easy fix. All you have to do is to run this simple command:

echo "set enable-bracketed-paste" >> ~/.inputrc && bind -f ~/.inputrc

Now when we paste the same text as before, it will look much nicer.

Theres many other things you can do with the bind command.

A good way to see what is already configured with bind is by simply running the following command that will list all of it:

bind -p

Hope you enjoyed the tip – let me know in the comments!