obsidian-open-with
obsidian-open-with copied to clipboard
Extra empty argument is passed
If I'm trying to launch /Applications/MacVim.app/Contents/MacOS/MacVim, what gets invoked is:
open -a "/Applications/MacVim.app/Contents/MacOS/MacVim" "/Users/huyz/Documents/Vaults/Vault/Obsidian playground.md" --args ""
The extra blank argument "" makes an empty window be opened too.
So I guess this is a bug and blank arguments should not be passed at all.
I've encountered the same issue. An additional empty argument is being passed and there are also problems with quotation marks. I have found a workaround for this problem by using this script on a Linux system.
#!/bin/bash
for arg in "$@"; do
if [[ "$arg" != '' ]]; then
args="$arg"
fi
done
xdg-open "$args"
If hitting this typing to open files with emacs, just add --visit as an extra argument.