aboutsummaryrefslogtreecommitdiff
path: root/.local/share/bin/open
blob: 7856488b2cca78e4349b29e55fae8f24d46a8150 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/sh
case "$(file --mime-type -Lb "$1")" in
	text/*)
		exec $EDITOR -- "$@"
		;;
	*)
		for file in "$@"; do
			fork xdg-open "$file"
		done
		;;
esac