7

In Red Hat, if there is a path somewhere on my terminal window and I triple click it, the whole path is selected. I can then easily copy it using middle-click or a regular copy-paste.

This doesn't seem to work in Terminal.app, i.e. triple click selects the whole line which is most of the time useless.

Is there a way to change this behavior? Should I look into other terminal apps like iTerm?

  • 3
    Looks like this work in iTerm.app. Nice ! Any tip for Terminal.app? – FrenchKheldar Dec 21 '11 at 0:10
10

The shortcut for Terminal.app is ++doubleclick.

You might also be interested in the following shortcuts:

  • +K to clear the screen
  • ctrl+U to delete everything to the left of the cursor
  • ctrl+K to delete everything to the right of the cursor
  • ctrl+A to jump to the left end
  • ctrl+E to jump to the right end
  • In Lion, it's ⌘+doubleclick, but it opens Safari not copy the selected URL to the clipboard. – lhf Jun 25 '12 at 22:55
  • 1
    ⌘+K clears all saved lines. To clear the screen, use control+L. – lhf Jun 25 '12 at 23:00
  • 1
    @lhf I don't know what you mean. ⌘+doubleclick seems to do nothing in 10.7.4 for me. To select a path only ⌘+SHIFT+doubleclick works for me. – gentmatt Jun 26 '12 at 5:31
  • 1
    @lhf, ⌘-Double-Click opens URLs (and man-page references, and email addresses). Add the Shift modifier to perform selection without attempting to open URLs. NOTE: You must not already have text selected, otherwise it will treat it as “add/remove discontiguous words to/from the selection” (for comparison, try Command-Clicking and -Dragging to add discontiguous text to the selection). – Chris Page Jun 27 '12 at 5:07
  • 1
    Prior to Mac OS X Lion 10.7, ⌘-Double-Click merely added/removed a word to/from the selection (Double-Click selects words, Command-Click adds/removes noncontiguous text to the selection) and ⌘-Shift-Double-Click would either select a path or open a URL, depending on what you clicked on. In Lion and later, ⌘-Shift-Double-Click always means "select a path or URL" and ⌘-Double-Click means "open the URL, if there is one and there isn't any other text selected". – Chris Page Jun 29 '12 at 13:32
4

Although this doesn't answer your question directly, a better terminal program is probably iTerm2. This does allow for this kind of selection, even nicer, double clicking also automatically copies it to the clipboard as well!

  • Thanks @romeovs! I made the initial post on the iPhone, where there seems to be no way to get to the editing help. – Paul Wagland Dec 23 '11 at 8:29
  • iTerm2 is way better than Terminal.app. Having a process list with Kill-Button is priceless. No more Ctrl-C. – Max Ried Jun 27 '12 at 6:56

You must log in to answer this question.

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