presenterm icon indicating copy to clipboard operation
presenterm copied to clipboard

[Feature Request] Use OSC 8 escape sequences to format hyperlinks?

Open dsanson opened this issue 6 months ago • 4 comments

It would be lovely if markdown links like [example](https://example.com) were parsed and reformatted using OSC 8 escape sequences in terminals that support this!

dsanson avatar Jun 20 '25 03:06 dsanson

Can you explain what is the use case for this? This is a presentation tool so having a feature that takes a link and actually hides it doesn't make much sense to me. e.g. when you're presenting people will see "example" instead of "https://example.com" so they won't know what link you're referring to.

mfontanini avatar Jun 20 '25 04:06 mfontanini

Ah, I was going to delete this, as further searching uncovered issue #325, where this was already discussed.

My primary use case is when teaching. Often, I will include a link to some resource (the syllabus, an assignment page) on Canvas or on the site that hosts our textbook. When I get to that part of the slide, I click on the link, and talk with the students about that resource, before eventually returning to the slides. In that context, the actual url is not useful to the students. They know how to get to those pages in other ways. Sometimes, I include a link to a local file on my own computer. Clicking the link opens the file, and then we discuss that. In both of these cases, the point of the link is not to communicate a location to the audience. It is to easily integrate navigation to an external resource into the flow of the slides.

dsanson avatar Jun 20 '25 04:06 dsanson

I will add that I am used to using the angled bracket notation, <htttp://example.com>, when what I really want to communicate is the url itself. But I agree that the general question about how to display urls during presentations (or printouts of slides) is complicated.

dsanson avatar Jun 20 '25 04:06 dsanson

I understand that how to present the URL needs discussion, but simply emitting OSC8 for all markdown links wouldn't hurt right? This just actively tells the emulator "Hey, this is clickable". Then you don't have to rely on the auto detection of the terminal emulator, which is more fragile.

yochem avatar Oct 30 '25 12:10 yochem