From 17a13a8eb788827845f07a37f0818e518859c9e0 Mon Sep 17 00:00:00 2001 From: axel Date: Thu, 12 Oct 2006 02:17:49 +1000 Subject: [PATCH] Use the xdg-open command in the open function if it exists darcs-hash:20061011161749-ac50b-f700489a238dafbd9aec4ef4f2eed731a8622b27.gz --- share/functions/open.fish | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/share/functions/open.fish b/share/functions/open.fish index 6a8665c5b..140269eee 100644 --- a/share/functions/open.fish +++ b/share/functions/open.fish @@ -6,7 +6,11 @@ if not test (uname) = Darwin function open -d (N_ "Open file in default application") - mimedb -l -- $argv + if type -f xdg-open >/dev/null + xdg-open $argv + else + mimedb -l -- $argv + end end end