polyipseity / obsidian-terminal

Integrate consoles, shells, and terminals inside Obsidian.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pass vault directory path or other variables to the script

matthewturk opened this issue · comments

One use case I commonly use is to open a terminal, then (in another directory) move (or create and then move) a file into the vault. I'd like to automate this with an alias in my shell, and being able to pass a variable or set of variables (or results of function calls) defined in Obsidian as environment variables would make this a fair bit easier and less prone to vault-specific error.

I'd be open to implementing this myself, but before moving forward I wanted thoughts on whether this should be a set of predefined variables, or a function-based mechanism for defining them.

Hmm, why not both? Have a list of options of predefined variables and a custom option that allows one to type custom JavaScript code.