fish-shell/share/functions/open.fish
axel 17a13a8eb7 Use the xdg-open command in the open function if it exists
darcs-hash:20061011161749-ac50b-f700489a238dafbd9aec4ef4f2eed731a8622b27.gz
2006-10-12 02:17:49 +10:00

17 lines
293 B
Fish

#
# This allows us to use 'open FILENAME' to open a given file in the default
# application for the file.
#
if not test (uname) = Darwin
function open -d (N_ "Open file in default application")
if type -f xdg-open >/dev/null
xdg-open $argv
else
mimedb -l -- $argv
end
end
end