On my second day when I worked at Reddit, I learned by accident that I do not want my terminal to have clickable links. I was working on image compression, and we had a script where we would render a column with the original image link, and a column with the new compressed image, and a column with the relative percentage of size to PNG, and there would be like 200 rows at a time. I managed to somehow accidentally cli…
Hyperlinks in terminal emulators
11–20 of 70 posts
Re: Hyperlinks in terminal emulators
#12Re: Hyperlinks in terminal emulators
#13I really think this is a security disaster waiting to happen, landing right in time for all the agentic terminal apps: printf '\e]8;;http://evil.com\e\\https://good.com\e]8;;\e\\\n' The next step would be to embedd a full javascript VM in the terminal and a CSS engine.
Re: Hyperlinks in terminal emulators
#14You can also make your own scheme-handler easily (on Linux at least). I have a `niri://` handler enabling linking to a specific Wayland window. (it has niche usecases :D)
This guy build a pty "proxy" to linkify Claude Code output: https://www.youtube.com/watch?v=GP5TwKnCzhQ
Re: Hyperlinks in terminal emulators
#15I really think this is a security disaster waiting to happen, landing right in time for all the agentic terminal apps: printf '\e]8;;http://evil.com\e\\https://good.com\e]8;;\e\\\n' The next step would be to embedd a full javascript VM in the terminal and a CSS engine.
What are you running in your terminal to be vulnerable to that threat model?
Re: Hyperlinks in terminal emulators
#16I really think this is a security disaster waiting to happen, landing right in time for all the agentic terminal apps: printf '\e]8;;http://evil.com\e\\https://good.com\e]8;;\e\\\n' The next step would be to embedd a full javascript VM in the terminal and a CSS engine.
Overall, I think the idea is super interesting, especially the ability to encode in the future other context than URLs with it. Whether actually useful, or just gimmicky, remains to be seen.
Re: Hyperlinks in terminal emulators
#17I think CLI code agents (eg. Claude Code) should render the line numbers in their diff view as links, opening that line in your editor of choice. You can also make your own scheme-handler easily (on Linux at least). I have a `niri://` handler enabling linking to a specific Wayland window. (it has niche usecases :D) This guy build a pty "proxy" to linkify Claude Code output: https://www.youtube.com/watch?v=GP5TwKnCzhQ
CC already does this with PR/MR/etc links for example (i.e. #123 is clickable and brings you to issue 123 in the repo it's working on)
Re: Hyperlinks in terminal emulators
#18Browsers are great at hyperlinks, like really great. How about using browsers for hyperlinks instead?
Re: Hyperlinks in terminal emulators
#19Earlier quoted context omitted.
In every implementation I've seen, the link only becomes clickable if you hold down a modifier key. By default, the links are just text. Which should make intuitive sense, because otherwise it'd be breaking existing semantics, as it would e.g. make it impossible to highlight the underlying text to copy-and-paste. (Or to send a click event to the underlying PTY-controlling process-group leader when mouse reporting is…
> the link only becomes clickable if you hold down a modifier key. Fun trick not a lot of people know - In a web browser, links which are normally clickable become UN-clickable if you hold a modifier. On a mac, it's (option). It's helpful if you want to select text inside a large link (or in a button) so you can copy it.
Re: Hyperlinks in terminal emulators
#20Earlier quoted context omitted.
What are you running in your terminal to be vulnerable to that threat model?
Trivially, `less` to see README.md of a malicious/compromised open source project. There are perhaps more plausible avenues of exploiting, but this one popped to mind immediately.