Replies: 1 comment 2 replies
-
I moved this to the active ideas category now. I have been thinking about issue #11 (escaping certain characters in variable values), and while I have not come up with a robust idea to solve it yet, Edit 2021-10-14: Environment variables actually do not prevent their content from being interpreted as arbitrary commands. I was wrong about it, and noticed it now that I tested environment variables more. Still, I might add support for environment variables at some point, but not as a workaround for issue #11. Let's say that an environment variable named I have two ideas for environment variables, with the first one being more important for the issue #11 . 1. Assigning values to environment variablesFor each shell command, there would be a list of defined environment variables. The list is empty by default. A user can add as many environment variables as they want. Each environment variable will have two fields:
The benefit of using environment variables to enclose SC's
2. Export current note's YAML key value pairs as environment variablesI'll just write this shortly now. It would be implemented later, after idea 1. Let's say you have the following YAML in your note: ---
alias: Another name for this note
my_variable: My value
--- Each shell command could have a toggle setting whether to export the YAML values as environment variables (off by default). YAML key There could also be a global prefix setting for YAML derived environment variables. It might default to e.g. More designing is still needed for how to parse nested values, like: ---
tags:
- FirstTag
- SecondTag
my_complex_set_of_values:
my_key: my_value
another_key:
more: nested
values:
- ABC
- DEF
- GHI
--- |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Add configurable environment variables, that will be passed to the executed processes. This way you could for example tell your own made script/program that you initiated it from Obsidian, in case it happens to have practical benefits.
This is just on an idea level: I'm sill pondering if this is actually needed? If you think you could use this feature, please comment below.
Beta Was this translation helpful? Give feedback.
All reactions