diff options
Diffstat (limited to 'home/dot_local/share/bin/executable_open')
| -rw-r--r-- | home/dot_local/share/bin/executable_open | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/home/dot_local/share/bin/executable_open b/home/dot_local/share/bin/executable_open new file mode 100644 index 0000000..d207dd1 --- /dev/null +++ b/home/dot_local/share/bin/executable_open @@ -0,0 +1,12 @@ +#!/usr/bin/env sh +case "$(file --mime-type -Lb "$1")" in + text/*) + exec $EDITOR -- "$@" + ;; + *) + for file in "$@"; do + fork xdg-open "$file" + done + ;; +esac + |