When gnome-terminal 3.6.2 highlights a URL ending in ), it incorrectly omits that ). Such URLs are found in wikis with disambiguation pages, such as http://zelda.gamepedia.com/Ocarina_of_Time_(Item), or thousands more in Wikipedia.

How can this be fixed?

Related: Disable hyperlinks in gnome-terminal


Strictly speaking this is not incorrect per se, since there is no standard describing how to locate the exact boundaries of a link inside a text. It's a bit of guesswork, and as such, there will always be cases when it doesn't exactly do what you're hoping for.

URLs sometimes appear inside parantheses, e.g. (http://example.com), and here the desired behavior is to exclude the closing parenthesis.

The regular expressions that locate URLs were completely rewritten in gnome-terminal version 3.18.3. However, the new behavior isn't what you're looking for either. The new behavior terminates the URL before the ( character.

These regexes are not configurable, you have to edit gnome-terminal's source code and recompile in order to change them.

Update: In bug 763980 we further improved gnome-terminal to correctly handle both cases. Beginning with version 3.25.1, it allows balanced pairs of parentheses in URLs. As such, in http://example.com/foo_(bar) (or in your example) the trailing parenthesis will be part of the URL, whereas in (http://example.com/foo) it won't.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.