Highlighted text in the default gnome terminal incorrectly includes word boundary characters which should be ignored
for example when I double click on
&freq_domain_magnitude_buffer_a2i
it should ignore the leading &
and just highlight freq_domain_magnitude_buffer_a2i
In the past below technique worked (it has no effect now) to define a set of such word boundary characters
UUID=$(gsettings get org.gnome.Terminal.ProfilesList default | tr -d "'" ) # strip off any single quotes
echo $UUID
gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:${UUID}/ word-char-exceptions '@ms "-#%&+,./:=?@_~"'
Even back when above worked its troubling to see the word legacy
... How to edit the list of word boundary characters ? can this be done using tool dconf-editor
? Is there a better alternative terminal which does support defining word boundary characters ?
This issue goes back years
dconf write word-char-exceptions not taking effect
Can I specify what characters set the double-click selection boundary in GNOME Terminal?
https://unix.stackexchange.com/questions/409017/gnome-terminal-double-click-delimiters
https://bugzilla.redhat.com/show_bug.cgi?id=1165244
On Ubuntu 22.04 gnome terminal (Version 3.44.0 for GNOME 42)
The problem is that
gsettings get
prints its output within single quotes, i.e. the value ofUUID
doesn't become the actual UUID that you'd expect but rather that value enclosed in literal apostrophes. You should remove those apostrophes.It's surely all doable via command line, using either
gsettings
(as you did) ordconf
, and a bit of shell script gluing. However, I find it more convenient to navigate indconf-editor
. As you navigate to/org/gnome/terminal/legacy/profiles:
, you'll probably see some of the subfolders already containing apostrophes in their names due to previous runs of the incorrect script that you posted. These are not used bygnome-terminal
, you may right-click and "Reset recursively". If you navigate to the given correct profile'sword-char-exceptions
, you can see the old value or set the new value there.PS. Don't worry about the word "legacy". I have no idea why it's there, but it's there, it's okay.