$= "[PDF](file://" + process.env.HOME + "/Desktop/P1888.pdf)"
Basically, I want to set my own variable instead of HOME.
Are you planning to only use these “environment variables” inside Obsidian? If so, could you just have an Environment note with dataview fields and use them through dataview(js) as [[MyEnvironmentNote]].myField? That will avoid causing side-effects on your computer that might confuse other programs (like messing with environment variables that they want, or believe are empty).
If you’re using these environment variables somewhere else (e.g. a Python program), you could use that tool’s method for setting variables, which is probably right near the documentation you’d already be looking at for reading those variables.
Yeah, I plan to use them inside Obsidian. Instead of HOME, I want something like BASEPATH=/Users/Username/Seafile/, so I can make the location dependent on my Cloud storage path of the specific device I’m using. That should not cause any side effects.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.