Double clicking on a word in gnome terminal selects the whole word. Unfortunately, this selection doesn't include colons such that URLs aren't completely selected, e.g. with
http://foo.example.org/
only
//foo.example.org/
is selected.
How do I configure this selection behavior such that complete URLs are selected?
See also:
- How to configure the double click behavior in an X terminal? – the described resources aren't interpreted by Gnome Terminal
- gnome classic terminal mouse double click selection – the Gnome Shell Terminal profile preference dialog doesn't have this option, anymore
Best Answer
How much is selected on double click can be configured via adding additional character classes to the default set. That means that adding a colon and other special characters that may show up in URLs leads to double click also selecting complete URLs.
This can be configured via the gnome config database. For that one has to get the id of the gnome shell profile. To get the default one:
Adding some URL related characters:
Note that:
@ms
denotes the maybe-string gvariant typea-z
specifies a range, where-az
specified the literal 3 characters. Thus, I have explicitly put the-
in the first positionHistory: In classic Gnome Terminal versions, the profile preference dialog contained a field for configuring those additional characters. With Gnome 3, UI experts have removed this option from the dialog because they thought it was too complicated to use, though. The default was also changed after Fedora 21.