Open JCzz opened 1 year ago
Agreed.
My 'shell' code block created a file, and I assumed the file would be in the same directory as the Obsidian note, but instead it is written to /Users/[user]/AppData/Local/Obsidian.
Here's an interim solution...
Use a {pre} block, or maybe the 'inject code' setting, to set the cwd...
(remember that {pre} doesn't work in combination with 'run-')
file_path=@vault_path/@note_path
dir_path=$(dirname "$file_path")
cd $dir_path
pwd
Hi
How can 'i set the current path for a shell or any language?
I would like to execute in the same directory as the Obsidian node.md file.