Feature request: DCS for inline hypertext-like links
Similar to (or perhaps as a part of) the addAnnotation
DCS, it'd be great to be able to turn some output directly into an inline hypertext-like link.
Ideally, the API would allow you to specify href
(to open with the default handler, with locations like http://www.google.com/search?q=foo
) or command
(perhaps with semantics akin to a captured output trigger parameter, with commands like echo 'edit("file", line)'
). I'm not sure what the best API would be for this. We need to specify the link type, the length, and the data. It could possibly be shoe-horned into addAnnotation
, with an extra pipe-separated component specifying note
(default), href
or command
.
This is somewhat similar to the request at #2755, but instead of detecting the output after it was printed, it allows iTerm-enabled programs to attach this information directly to the output. One use-case is for backtrace display in Julia's TerminalExtensions project: https://github.com/Keno/TerminalExtensions.jl/pull/9#issuecomment-134671118.