Terminal should ask for confirmation before pasting multiple lines

Bug #1452893 reported by teo1978
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
gnome-terminal (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

It's far too easy to copy and paste a block of text by mistake into a terminal.
For example, you copied a command you wanted to paste, then you copied some text for other purposes and forgot about it, then you go to the terminal and paste, thinking you are pasting a line, and instead you paste 500 lines of text (e.g. code in some programming language), which has potentially disastrous effects, the most relevant being:
- if accidentally pasting dozens of lines of code, though most result in errors, there are high chances that more than a few happen to be valid (though nonsense) bash commands, and you may end up creating dozens of files with nonsense names, and in some cases even deleting files
- you loose all your bash history, because it has a limit and you fill it with garbage.

So, when you paste into the Terminal and the pasted text is more than one line, it should ask for confirmation. There should be a "don't ask again" checkbox for those who may be annoyed by this prompt. The "don't ask again" would last for the current session; perhaps a way could be designed to have some setting editable somewhere for those who want to disable this feature completely.
But it should be enabled by default.

That you can destroy a system just by accidentally pasting a block of lines into a terminal, when it's obvious that what you're pasting is not even bash code, is simply ridiculous.

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: gnome-terminal 3.6.2-0ubuntu1
ProcVersionSignature: Ubuntu 3.13.0-51.84-generic 3.13.11-ckt18
Uname: Linux 3.13.0-51-generic x86_64
ApportVersion: 2.14.1-0ubuntu3.10
Architecture: amd64
CurrentDesktop: Unity
Date: Thu May 7 22:36:44 2015
InstallationDate: Installed on 2013-10-11 (573 days ago)
InstallationMedia: Ubuntu 13.04 "Raring Ringtail" - Release amd64 (20130424)
SourcePackage: gnome-terminal
UpgradeStatus: Upgraded to trusty on 2014-05-24 (348 days ago)

Revision history for this message
teo1978 (teo8976) wrote :
Revision history for this message
teo1978 (teo8976) wrote :
John Samuel (johnsamuel)
Changed in gnome-terminal (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.