enable-bracketed-paste (On)
When set to On, readline will configure the terminal in a way that will enable it to insert each paste into the editing buffer as a single string of characters, instead of treating each character as if it had been read from the keyboard. This can prevent pasted characters from being interpreted as editing commands.
What is the size of buffer that is used by readline/bash/terminal? I have no idea.
Thanks for the information.
In fact having this option is not a problem as soon as I’m able to increase the buffer size.
But I keep your solution in mind, could be helpful when I will have to paste a large buffer