diff options
Diffstat (limited to '.local/share/bin/open')
-rwxr-xr-x | .local/share/bin/open | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/.local/share/bin/open b/.local/share/bin/open new file mode 100755 index 0000000..7856488 --- /dev/null +++ b/.local/share/bin/open @@ -0,0 +1,12 @@ +#!/bin/sh +case "$(file --mime-type -Lb "$1")" in + text/*) + exec $EDITOR -- "$@" + ;; + *) + for file in "$@"; do + fork xdg-open "$file" + done + ;; +esac + |