5

on the osx command line in the default terminal application [ Version 2.11 (440) ] when terminal shows a string (so happens to be file fullpath)

/Users/scottstensland/src/foo/repos/live/test-scott/templates

and I wish to highlight the entire string (full pathname) I double click on any part of above string ... it only highlights the one word I am double clicking on

How to change terminal to highlight entire compound string interspersed with delimiters like the '/' character etc ...

normally I use Ubuntu which has below trick to define the word boundary characters in terminal

gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/ word-char-exceptions  '@ms "-,.?%&#_+@~·/"'

where b1dcc9dd-5262-4d8d-a863-c897e6d979b9 is just my profile as retrieved using

gsettings get org.gnome.Terminal.ProfilesList default

so I believe I need the mac osx equivalent to above linux gsettings command

mac osx 11.4   Big Sur
mac mini M1  2020
chip  Apple M1

seems strange the default osx terminal is not optimized for software engineers ;-(

I am using bash shell on osx ... for reference I also use bash on linux

2
  • Have you tried using iTerm2? Commented Jul 27, 2021 at 17:29
  • What shell in Ubuntu? Which shell in macOS? You could try triple-clicking to select the whole line. And "not optimized for software engineers" -- why should they, that's not their user base. Besides, every engineer wants something completely different! :-) I haven't found this issue to be a problem.
    – aMike
    Commented Jul 27, 2021 at 18:02

1 Answer 1

3

The short answer I've found is no; it's not possible to configure for Terminal (see https://superuser.com/questions/125011/how-to-change-word-selection-separator-characters-in-mac-os-x)

Workaround if you just want double click behavior in Terminal

Shift+Cmd + double-click

Workaround if you want more complex word delimiter control

Get iterm2 and use

brew install iterm2

That's got configurable word delimiters (see https://apple.stackexchange.com/a/25283/23513)

You must log in to answer this question.

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