From 6b254cb52f0fb789d59138a28d6ddfc99ed8274e Mon Sep 17 00:00:00 2001 From: Francesco Minnocci Date: Mon, 22 Jun 2020 21:39:53 +0200 Subject: [PATCH] Integrate upstream PR https://github.com/march-linux/mimi/pull/4, which adds support for executables with arguments --- xdg-open | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xdg-open b/xdg-open index 6626834..ccf89f7 100755 --- a/xdg-open +++ b/xdg-open @@ -119,6 +119,9 @@ if [[ "$arg" =~ ^([a-zA-Z-]+): ]]; then protocol="^$protocol" fi +# executable with arguments +[[ ! "$mime" ]] && [[ -x "$1" ]] && mime="$(file -b --mime-type "$1")" + # application mime is specific [[ "$mime" =~ ^(audio|image|text|video)/ ]] && general_mime="${BASH_REMATCH[1]}/" @@ -151,7 +154,7 @@ done # use linopen as a fallback just in case if exist linopen; then - fork_run "linopen" "$arg" + "linopen" "$arg" fi # ask