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.
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:
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.