Skip to content

Add clickable hyperlinks when URLs are on screen #659

@axololly

Description

@axololly

I noticed that in some terminals like Gnome, printed URLs become clickable from within the GUI. I know that you can use the following with an OSC sequence to make a clickable URL:

printf '\e]8;;http://example.com\e\\This is a link\e]8;;\e\\\n'

When this is split across multiple lines, more sequences can be attached. That "This is a link" text could very easily be replaced with the URL itself again to act as [http://example.com](http://example.com) does in markdown.

Somewhere in TextBuffer::render, you could leverage the searching functionality you already have to compare against some URL regex found online (see here) and then inject this additional OSC sequence to be printed to the TTY.

Metadata

Metadata

Assignees

No one assigned

    Labels

    I-featureFeature requests and any other major tasks. Requires major work in the 1000s of LOC.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions