aboutsummaryrefslogtreecommitdiff
path: root/open-file
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano.tronto@gmail.com>2021-11-25 11:53:14 +0100
committerSebastiano Tronto <sebastiano.tronto@gmail.com>2021-11-25 11:53:14 +0100
commit68898198058898bf6df880106adfabe9cd2704c6 (patch)
tree65dad45e7e8fa0b696b1309580027c3bfa198d41 /open-file
parent4de16d47c251405e27ec9119cd4ba08d7a91d7b9 (diff)
downloadscripts-68898198058898bf6df880106adfabe9cd2704c6.tar.gz
scripts-68898198058898bf6df880106adfabe9cd2704c6.zip
Fix multiple open for different file types; comment out open in terminal section
Diffstat (limited to 'open-file')
-rwxr-xr-xopen-file10
1 files changed, 5 insertions, 5 deletions
diff --git a/open-file b/open-file
index 1592c75..0134e5c 100755
--- a/open-file
+++ b/open-file
@@ -30,9 +30,9 @@ while getopts "s:t:" opt; do
30done 30done
31 31
32# If launcher = "", assume running in terminal, so some programs change 32# If launcher = "", assume running in terminal, so some programs change
33if [ -z "$launcher" ]; then 33#if [ -z "$launcher" ]; then
34 xedit=${EDITOR:-vi} 34# xedit=${EDITOR:-vi}
35fi 35#fi
36 36
37shift `expr $OPTIND - 1` 37shift `expr $OPTIND - 1`
38toopen=$@ 38toopen=$@
@@ -40,10 +40,10 @@ toopen=$@
40 40
41for f in $toopen; do 41for f in $toopen; do
42 [ ! -f "$f" ] && echo "$f: bad argument" && exit 1 42 [ ! -f "$f" ] && echo "$f: bad argument" && exit 1
43 [ -z "$mimetype" ] && mimetype="$(file --mime-type "$f" -bL)" 43 [ -z "$mimetype" ] && localmime="$(file --mime-type "$f" -bL)"
44 44
45 prog="" 45 prog=""
46 case "$mimetype" in 46 case "$localmime" in
47 video/*) 47 video/*)
48 prog="$video" 48 prog="$video"
49 ;; 49 ;;

Generated with cgit - Back to sebastiano.tronto.net