double click and select the path(including '/') in Terminal.app

I'm using Terminal.app on Mac OS10.6.3, with gnu screen and zsh.

What I want to do is, see pwd(or an URL) in Terminal.app and double click on it, and select the whole path, to copy and paste after that.

But what I get now is a single directory name, because '/' is not treated as a word. I found that iTerm has a setting to change it(iTerm -> Preferences -> Mouse -> Characters considered part of a word), but is there any way to do this on my environment?

Answers


Given the age of this question, you have probable found the answer elsewhere already, but if not, here's how to do it in "newer" versions of Terminal (Leopard 10.5 and Snow Leopard 10.6)...

⌘ ⇧ double-click

See also here.

Just to summarize:

  • to select a path or a URL: command-shift-double-click

    ⌘ ⇧ double-click

  • to select non-contiguous selections: command-click-and-drag

    ⌘ click-and-drag

  • to select block regions: alt-click-and-drag

    ⌥ click-and-drag

Hope this helps.

Loads more useful keyboard shortcuts in this article.


Need Your Help

Can you develop native iPhone apps in Ruby?

iphone ruby cocoa-touch ios

Hi I'm looking into iPhone development, and Objective-C is not be my preferred language. As far as I can see at this moment Ruby cannot be used to talk to Cocoa Touch at the moment on the iPhone.

Implement "Open Containing Folder" and highlight file

c# .net file windows-explorer

This can be a handy functionality to have in a program that works with files/folders. It's easy enough to actually open the containing folder using: