obsidian-open-with icon indicating copy to clipboard operation
obsidian-open-with copied to clipboard

Extra empty argument is passed

Open huyz opened this issue 3 years ago • 2 comments

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.

huyz avatar Jul 28 '22 08:07 huyz

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"

akhiljalagam avatar Aug 14 '23 04:08 akhiljalagam

If hitting this typing to open files with emacs, just add --visit as an extra argument.

jasonish avatar Sep 20 '23 23:09 jasonish