Comment 3 for bug 1791337

Egmont Koblinger (egmont-gmail) wrote :

I'm not affiliated with Ubuntu, so I probably shouldn't be the one warning you, but your style is unacceptable, no matter how serious issue you report.

gnome-terminal could warn you before pasting a newline. It could offer to disable that warning, in which case most users would do so, falling back to the problem you reported. Or it could not offer such possibility, making intentional multi-line pastes annoying as hell.

I believe the proper solution is to enable bracketed paste mode in your shell (which requires a newer Ubuntu, shipping bash-4.4). Please reassign (or report a new bug) against Ubuntu's bash or readline package to enable this feature by default.