aboutsummaryrefslogtreecommitdiffhomepage
path: root/share/functions
diff options
context:
space:
mode:
authorGravatar axel <axel@liljencrantz.se>2006-10-12 02:17:49 +1000
committerGravatar axel <axel@liljencrantz.se>2006-10-12 02:17:49 +1000
commit17a13a8eb788827845f07a37f0818e518859c9e0 (patch)
tree20ab098e67ea60be61e3b2c77d572f1bcc61aaf1 /share/functions
parentafaf156a425a02a4aa1958113aebd102431c3bf5 (diff)
Use the xdg-open command in the open function if it exists
darcs-hash:20061011161749-ac50b-f700489a238dafbd9aec4ef4f2eed731a8622b27.gz
Diffstat (limited to 'share/functions')
-rw-r--r--share/functions/open.fish6
1 files changed, 5 insertions, 1 deletions
diff --git a/share/functions/open.fish b/share/functions/open.fish
index 6a8665c5..140269ee 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