Replies: 2 comments
-
file=$(echo {{caret_paragraph}} | rg -o '!\[\[(.+)]]' -r '$1')
open -a /System/Volumes/Data/Applications/Shottr.app "$file" Update: this actually doesn't work b/c the file can be in a folder. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hi! Thank you for your suggestion! 🙂 I can't promise to implement this, but I can take it into consideration. I'd need to think about the following things:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
description
It would be cool to have a variable, eg.
{{selected_link}}
, that would give me the link/path in the current line.If there are several — it should return the one under caret, or maybe the one closest to the caret.
If it's an internal link (eg. to a file in the vault), it should be resolved.
usecase
I want to create a command like "open in a specific app". For example:
In this situation,
{{selected_link}}
would be the path toIMG_0704.jpg
, and I could pass it toopen -a path/to/app {{selected_link}}
.Since there is only one link, the caret could be anywhere on the line and
{{selected_link}}
would be the same.misc thoughts
Maybe there should be
{{selected_link:title}}
and{{selected_link:url}}
, although I only need the latter.Maybe there should also be a distinction between external links / internal links / embeds, but again for my usecase just the url/path is enough.
Beta Was this translation helpful? Give feedback.
All reactions