Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

That PuTTY option to select and then right-click to paste is the best invention after the mouse. Is there any way to make Terminal in OS X do this? Hack the source code? Install something?

Is the source code for the OS X Terminal publicly available?

share|improve this question
up vote 6 down vote accepted

Install SIMBL and then install TerminalCopyOnSelect.

  • At first, you should install SIMBL.
  • Download the zipped plugin file I mentioned above and expand it.
  • Copy the extracted file "TerminalCopyOnSelect.bundle" to the plugin directory which is located at ~/Library/Application Support/SIMBL/Plugins/
  • Terminate all processes of and restart it.
share|improve this answer
This is cool. Already something, but what I really wanted was a: CopyOnSelectAndPaste Like putty! – TraderJoeChicago Jan 7 '10 at 17:53
As @Arjan said, Terminal can do this: Choose Edit > Paste Selection (or Shift-Comamnd-V) or Middle-Click, the latter of which I assume is what you meant by “right-click” in your original question. – Chris Page Jan 5 '12 at 8:51

In Terminal, select something and then within the same Terminal window do one of the following:

  • click and drag the selection (a bit; the mouse pointer will change), and release to paste (hit Esc while dragging to cancel)

  • or: paste using Shift-Command-V

  • or: paste using the middle mouse button

share|improve this answer
I use Cmd-Shift-V all the time! – Josh Oct 29 '09 at 18:16

To answer your 4 questions:

That putty option to select and then right-click to paste in the best invention after the mouse. Is there anyway to make the terminal do this?

No, you can however select the text you want and drag-n-drop your selection to the command prompt.

Hack the source code?

Probably can be done through reverse engineering, but why bother for something so trivial, and the fact that it's illegal :P

Install something?

iTerm as kbisset suggests.

Are the source code for the mac terminal public available?

No but iTerm's is

share|improve this answer
“No, you can however select the text you want and drag-n-drop…” The answer is “Yes”. You can Middle-Click to do the same thing as Edit > Paste Selection. “right-click to paste” is likely a typo; either Sergio meant “middle-click to paste” or he’s using a terminal application with a “Paste Selection” contextual menu command. – Chris Page Jan 5 '12 at 8:48
Reverse engineering is not illegal in the United States. Not sure what country you're posting from, though. – samkass Sep 11 '12 at 17:58
Right click to paste is how it works in Putty (in windows) and I think maybe some Linux based terminal apps also. I haven't looked into it myself, but Karabiner should be able to "remap" right mouse button to middle mouse button (eg simulate a middle mouse button click) when the Terminal app has focus. – Herr Grumps Jun 28 '15 at 15:29

iTerm, an alternative to Terminal, can do this.

share|improve this answer
And so can Terminal. Edit > Paste Selection or Middle-Click if you have a three (or more) button mouse. Or drag the text a few pixels and release. – Chris Page Jan 5 '12 at 8:45

You can launch an X11 server and use xterm. Everything is already in the box.

You can even type xterm& in, and X11 will automatically be launched.

share|improve this answer

iTerm 2 also has an option to copy text to the normal clipboard on selection:

You can remap the middle button to paste from the clipboard:

Like in Terminal, you can also use shift-command-V (Edit > Paste Special > Paste Selection) to paste the text that is selected elsewhere in the current window.

share|improve this answer

You could also install TotalTerminal and enjoy hotkey access to a dropdown Quake-style terminal that has a copy-on-select setting too :-)

TotalTerminal augments the existing Terminal and doesn't replace it so I find it a nicer solution than installing and using another app :-)

share|improve this answer

my workflow

for copy: cmd-shift-click - it copies full unix paths like putty

for paste: triple click trackpad which works like middle button of mouse on xwindow or right button in putty (requires: )

share|improve this answer

If you tried the accepted answer; the SIMBL TerminalCopyOnSelect approach but failed with a dialog showing:

Terminal 2.5 (v334) has not been tested with the plugin TerminalCopyOnSelect (null)(v0.1.0).
As a precaution, it has not been loaded. Please contact the plugin developer for further information.

It's because TerminalCopyOnSelect you downloaded applies only if bundle version is 237 - 240.

You can download and build it yourself from github .

git clone
cd terminalcopyonselect
open TerminalCopyOnSelect.xcodeproj
# edit Info.plist and set SIMBLTargetApplications's MaxBundleVersion to 400, which is enough for MacOSX Yosemite's
# hit build, and it will copy TerminalCopyOnSelect.bundle under it's proper place: ~/Library/Application Support/SIMBL/Plugins
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .