Closed Taitava closed 1 year ago
It's implemented now, but I still want to consider doing the variable parsing in output wrappers a bit differently. Currently, variables in output wrapper texts are parsed after executing a shell command. This has the following points:
{{date:HH:mm:ss}}
might have different seconds, if the shell command execution takes long.{{event_*}}
variables cannot be used in output wrappers (well, could, but implementing them here would require some tweaking).I want to try to come up with an alternative solution that could parse variables in output wrappers before executing a shell command. That would solve the abovementioned three problems. It might be hard to do, though. That being said, even this current implementation is ok, if an improvement is too hard to make.
I won't release this feature until I've inpsected the alternative solution.
I was able to implement the alternative solution.
Only tests need to be made, then it's ready.
Tests are done.
I just noticed that any variables used in output wrappers are escaped (except {{output}}
), although they should not be. Output wrapper texts are not passed to shells, so escaping special characters in them should not be done, as the ecaping won't disappear in the end.
Released now.
Quote from me in: https://github.com/Taitava/obsidian-shellcommands/discussions/244#discussioncomment-3211841
TODO