> gnome-terminal could warn you before pasting a newline. It could offer
> to disable that warning, 

Yep, it should do both things (I forgot to mention the second one), or,
as I said, just require a single Enter keystroke (and still, obviously
have a setting to disable that). I don't think having to hit Enter when
you paste several lines, just like you usually do when you paste a
single line (usually not including the final newline) would be a great
annoyance for those who often paste whole sequences of commands, but if
it was for someone, there would always be the setting to disable it.

> I believe the proper solution is to enable bracketed paste mode

Does that address the case where I actually do want to paste a sequence
of commands and run them?

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to gnome-terminal in Ubuntu.
https://bugs.launchpad.net/bugs/1791337

Title:
  Terminal should prompt for confirmation before pasting text containing
  newlines

Status in gnome-terminal package in Ubuntu:
  New

Bug description:
  Steps to reproduce:
  - copy some texts that includes newline characters
  - paste it (usually accidentally) in a terminal

  Expected behavior:
  Before pasting something that will be executed (because newline characters 
will be processed as if hitting the Enter key), the terminal should prompt for 
confirmation.
  OR at least, what you paste should be only displayed and not actually 
processed until you press the Enter key.

  THIS SHOULD BE F***ING OBVIOUS, I can't believe I have to report this.

  Observed behavior:
  blindly pastes everything and executes each line as a command.

  THIS IS F***ING DANGEROUS.

  It's too easy to forget to copy what you actually meant to copy, or
  forget you copied something else afterwards, and accidentally paste a
  random block of text of several lines which usually isn't even shell
  commands, but some of them can actually happen to be valid commands
  that actually do stuff.

  ProblemType: Bug
  DistroRelease: Ubuntu 16.04
  Package: gnome-terminal 3.18.3-1ubuntu1
  ProcVersionSignature: Ubuntu 4.4.0-134.160-generic 4.4.140
  Uname: Linux 4.4.0-134-generic x86_64
  NonfreeKernelModules: nvidia_uvm nvidia
  ApportVersion: 2.20.1-0ubuntu2.18
  Architecture: amd64
  CurrentDesktop: Unity
  Date: Fri Sep  7 18:32:28 2018
  InstallationDate: Installed on 2013-10-11 (1791 days ago)
  InstallationMedia: Ubuntu 13.04 "Raring Ringtail" - Release amd64 (20130424)
  SourcePackage: gnome-terminal
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gnome-terminal/+bug/1791337/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to