aboutsummaryrefslogtreecommitdiff
path: root/open-file
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano.tronto@gmail.com>2021-12-22 09:57:53 +0100
committerSebastiano Tronto <sebastiano.tronto@gmail.com>2021-12-22 09:57:53 +0100
commit5ac980dec555c543815d9defc3b7192354539b6c (patch)
tree0df3bafdb245f580029ba54f86313fdb609b6de0 /open-file
parentbea38c1ce49b5e5e60e4e9f9261ec176ff59cd3c (diff)
downloadscripts-5ac980dec555c543815d9defc3b7192354539b6c.tar.gz
scripts-5ac980dec555c543815d9defc3b7192354539b6c.zip
Fixed open-file, changed a bit open-stdin
Diffstat (limited to 'open-file')
-rwxr-xr-xopen-file1
1 files changed, 1 insertions, 0 deletions
diff --git a/open-file b/open-file
index 003da25..055aad2 100755
--- a/open-file
+++ b/open-file
@@ -20,6 +20,7 @@ xedit=${XEDITOR:-gedit}
20 20
21openfile() { 21openfile() {
22 f="$@" 22 f="$@"
23 localmime="$mimetype"
23 24
24 [ ! -f "$f" ] && echo "$f: bad argument" && exit 1 25 [ ! -f "$f" ] && echo "$f: bad argument" && exit 1
25 [ -z "$mimetype" ] && localmime="$(file --mime-type "$f" -bL)" 26 [ -z "$mimetype" ] && localmime="$(file --mime-type "$f" -bL)"

Generated with cgit - Back to sebastiano.tronto.net