Feature Request: support for more replacement values in the "Make Hyperlink" Action under Triggers
While it turns out it is possible to use
\0 in the context of the parameter for making a hyperlink (which may or may not be documented—I couldn't find any documentation on this, but discovered it through experimentation based on the fact that that works in a different context in iTerm), it does not appear to be possible to use anything else.
$PWD would be very useful to me, either through environment variables in general being available, or a special escape character like
\d for the directory, or specific variables being whitelisted, or whatever other mechanism seems most consistent with the iTerm UX in general.
My specific use case is trying to turn incomplete paths appearing in the output of
rails server into clickable links. I can't use "Semantic History" for this because Rails doesn't give the path from the current directory, but instead from
./app/views. This screenshot should show all details:
Unfortunately the mouse cursor is hidden in the screenshot, but I was mousing over the lowest light blue highlight, for the footer partial. You can see that the full URL is correct, but only because I hard-coded the path to the project I'm currently working on in the parameter for "Make Hyperlink", visible to the right. This is obviously not ideal, as it requires me to manually change that every time I switch to working on a different project.
(As an aside, if you're curious about the
editor:// bit, I couldn't get the
vscode:// protocol handler to work, and I had created my own before that was available, and while experimenting to get this all working, I gave up on
vscode:// and switched to mine and suddenly I could get it to go to the correct file instead of just opening VS Code.)