Command automatically execute after a copy paste

Bug #706829 reported by kao_chen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gnome-terminal (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: gnome-terminal

If I do a copy paste on a command with the middle mouse button, it will be automatically validate in the gnome-terminal.
I just enter "history" in order to find an old command, I select it with a triple click, I copy it with the a middle click, the command is well paste, but it will be executed immediately.
In my case the command is wrong because I have paste the line number, I wanted to correct it before its executions.
And many times, if commands come with a copy/paste, they will be executed directly without warning.

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: gnome-terminal 2.32.0-0ubuntu1
ProcVersionSignature: Ubuntu 2.6.35-24.42-generic-pae 2.6.35.8
Uname: Linux 2.6.35-24-generic-pae i686
NonfreeKernelModules: nvidia
Architecture: i386
Date: Mon Jan 24 09:19:14 2011
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Beta i386 (20100901.1)
ProcEnviron:
 LANG=fr_FR.utf8
 SHELL=/bin/bash
SourcePackage: gnome-terminal

Revision history for this message
kao_chen (kaochen2) wrote :
Revision history for this message
Chris Wilson (notgary-deactivatedaccount) wrote :

You're copying a carriage return when you copy the command. You only need to double click it when you're copying text from the terminal. That third click is copying the whitespace at the end of the line, which is being interpreted as a carriage return when you paste it.

Changed in gnome-terminal (Ubuntu):
status: New → Invalid
Revision history for this message
kao_chen (kaochen2) wrote :

I think the "triple click" selects the entire line, with the carriage return placed at the end.
Gnome terminal probably displays each line with an hidden return at the end of each line.
With a copy/paste we can catch a carriage return practically anywhere.
The confusion comes from that in many case you will not know if you have one with you or not.

For example, in a html page, if you want to copy the command >echo "hello",
you will not copy a carriage return if the html code is like this :<div>echo "hello"</div>
but you will have it in this case: <div>echo "hello"
echo "I am a other text line"</div>
And in the both case, you'll see a end of line:

echo "hello"

echo "hello"
echo "I am a other text line"

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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