URL scheme open note in new tab?

Things I have tried

searching forum

What I’m trying to do

open an existing file in obsidian from a shell script, but have it open as a new tab, not replace an already open tab

I have this script that I pass a filename to

FILE1=“$@”
FILE2=basename "$FILE1"
FILE3=echo "$FILE2" | sed 's/\.md//'
VAULT1=cat /home/$USER/.myWikiPath.txt
VAULT2=basename "$VAULT1"

xdg-open “obsidian://open?vault=${VAULT2}&file=${FILE3}”

This works fine in the sense that the file does open in Obsidian, but it does so at the expense of whatever other file is open.

How do I tell it to open as a new tab instead of replacing the last active tab?

thanks,

  • Dave

I believe the Advanced URI plugin has this functionality:

Thanks, I’ve used it to get this far:

xdg-open “obsidian://advanced-uri?vault=${VAULT2}&filename=${FILE4}”

which successfully opens the file in obsidian, but the only reference I see to opening in a new pane is a note about obsidian-shortcuts-for-starred-files

any suggestions? (I think I’ll submit an “issue” at that git page)

Solved: turns out the settings for plugins are not at the place where you read about and install the community plugin, but rather in a separate “plugin options” section of the general settings. Sorry - new user here o_O

Thanks ryanjamurphy for pointing out that plugin :slight_smile:

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.