Hyperlinks in terminal emulators
21–30 of 70 posts
Re: Hyperlinks in terminal emulators
#22I 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
> I 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. 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
#23Re: Hyperlinks in terminal emulators
#24In contrast, in Plumber [1], we have things like !98—this text opens pull request no. 98 by passing "!98" to the local server, which knows how to interpret it.
Both approaches go one step beyond plain text. However, Plumber’s approach, at least, doesn’t compromise the plain text itself by embedding invisible elements.
This eliminates an entire category of risks by design. With no hidden metadata, accidental clicks are less probable and social engineering attacks, such as UI deception, are impossible.
Re: Hyperlinks in terminal emulators
#25I 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.
WARNING: This has security implications as it allows malicious URLs
to be shown as another URL or hidden.
Make sure you understand the implications before turning this on.
Then it has an option for you to enter the link schemes you want to enable, like https://, file://, etcRe: Hyperlinks in terminal emulators
#26I 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
#27I wonder though if this is a popular feature. Tilix is under minimal maintenance at the moment, so alternatives would be good to have..
Re: Hyperlinks in terminal emulators
#28I love these and wish they were used more by command line applications. For instance in GCC, when your terminal supports them, compiler diagnostic flags are clickable and something like "warning: address of local variable ‘a’ returned [-Wreturn-local-addr]" can be clicked to open the GCC documentation for that flag.
Edit: the same applies to diffs generated by /bin/diff. Most of the time, diff strings are unique enough to locate them by plain text searching.
Re: Hyperlinks in terminal emulators
#29https://web.archive.org/web/20250324071822/https://gist.gith...
Re: Hyperlinks in terminal emulators
#30Earlier quoted context omitted.
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.
Opening a URL should always be safe. It's a security bug if it isn't.