views:

695

answers:

5

How can I copy and paste in irb (Interactive Ruby Shell) on Windows?

+4  A: 

To copy: Hit alt-space, choose Edit, choose Mark, drag-select the text, hit enter.

To paste: Hit alt-space, choose Edit, choose Paste.

Blorgbeard
Thank you, very helpful.
sker
+17  A: 

To avoid having to open the drop-down menu and clicking, you need to change the command window settings. To do this, right-click the title bar, choose Properties, turn on "QuickEdit Mode" under the Properties tab (and keep "Insert Mode" on), then OK.

Now, to copy: drag to select, right-click to copy.

To paste: right-click with no selection.

crosstalk
Hey, neat - I'm setting that in my defaults now!
Blorgbeard
I wish someone had told me this 2 years ago! Thanks.
AShelly
+1  A: 

For CLI copy/paste:

Ctrl+insert ==copy Shift+insert == paste

pookleblinky
Thanks. The 'Shift+Insert' works for pasting. Not sure about the 'Ctrl+Insert' for copying though.
Vicer
+1  A: 

You might want to consider using Console, a replacement for Windows' terrible command-line chrome. It offers fully redefinable keyboard shortcuts plus tabs, so it's ideal for IRB.

Charles Roper
A: 

check out console2--very nice and allows you to paste by using right click or what not.

rogerdpack