Reply to post: Re: An alternative to Ctrl-c

If the thing you were doing earlier is 'drop table' commands, ctrl-c, ctrl-v is not your friend

juice

Re: An alternative to Ctrl-c

> Cut instead of Copy doesn't work if the thing you are copying from is copyable but not editable (like a web page).

Sad but true.

Equally, copy-pasta on Linux can be a bit confusing. At least on a fairly vanilla Ubuntu install:

First, in a console/terminal, crtl-C traditionally means "send a STOP request". Instead, you have to use crtl-shift-C and ctrl-shift-V to copy and/or paste.

Secondly, most applications and web browsers (e.g. Chrome, Google Docs) support the use of crtl-C and crtl-V to copy and paste

Thirdly, you can also implicitly copy-paste things by selecting text in the terminal with your mouse and clicking the middle mouse button

Fourthly, the middle mouse button will also paste whatever's been selected by pressing crtl-C

This can lead to occasional fun, as you copy something from a web page[*] and try to paste it into a terminal via the mouse, only to accidentally click-select some text in the terminal. Which then replaces whatever's in the clipboard with the text from the terminal, which may well include a newline or two.

Hey presto: if you're not paying attention, the instant execution of whatever random text you copy-pasta'd. Best hope it's not anything too destructive...

[*] Hello, stackoverflow!

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon