11

I am new to Mac and still struggling to be productive with fewer clicks and keys...

When I use Terminal and click on a word, I would like the delimiter to be only space and not other characters like . _ / etc. I want these to be treated as part of the word. Then, I would like to be able to click on a word, be able to select the whole word and then copy and paste it to another place, say command line or into an editor etc. How do I achieve this?

Many thanks!

1
  • 5
    Note: If you're specifically interested in selecting file and pathnames, Shift-Command-Double-Click will select pathnames (and URLs).
    – Chris Page
    Commented Sep 18, 2011 at 0:45

3 Answers 3

14

You might want to take a look at iTerm2, where you can set the word delimiter in the preferences. I'm a recent convert myself and like it a lot better than Terminal.app. There's a special Terminal.app keyboard shortcut compatibility set to make switching easier.

iTerm prefs window screenshot

1
1

For any new users coming to this question, the settings in iTerm are now done in two places :

  1. General -> Selection : If you uncheck the "Double-click performs smart selection" option, you can specify delimiters in the last box.

  2. Profiles -> Advanced -> Smart Selection : If you check the box in point 1, you can make changes here using regex.

enter image description here

1
  • This might work better as an edit to the accepted answer.
    – nohillside
    Commented Jul 18, 2023 at 12:49
0

Apple's Terminal application does not (yet) provide a way to configure this.

But @Chris Page's comment is a good workaround and deserves a standalone answer:

Note: If you're specifically interested in selecting file and pathnames, Shift-Command-Double-Click will select pathnames (and URLs).

You must log in to answer this question.

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