Feature Request: Hidden content for Smart Selection / Triggers
To make a Smart Selection action do what I want, sometimes I need it to have more contextual information than is immediately present within the matched string.
Where I don't control the source of the output, there's not much to be done about that. But often I do.
Given that, I think it would be handy if there was an escape sequence which would be completely ignored for normal visual rendering, but would cause its contents to be present when Smart Selection is doing its scan for matches.
I assume this would be similarly useful for Triggers.
Example
Given input: obligatory SP OSC 1337 ; ShadowContent=aGVsbG8g ST world
The content shown in the terminal would be: obligatory world
But a command-click on "world" would execute a Smart Selection action declared to match: hello ([a-z]+)
, because the content used for matching purposes is obligatory hello world
.
It would not match a Smart Selection for obligatory world
: there are no additional match attempts here, it's strictly changing the content considered.
I have no idea whether this is even physically possible... but it seems like it could be very useful if so.
My immediate use case is fairly boring: collapsing file paths for elegant display, but retaining the ability to command-click to open them.
A more extreme use could be to display a single-character emoji "button", whose behaviour has been encoded in adjacent invisible detail.