diff options
| author | Sebastiano Tronto <sebastiano.tronto@gmail.com> | 2021-12-22 09:57:53 +0100 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano.tronto@gmail.com> | 2021-12-22 09:57:53 +0100 |
| commit | 5ac980dec555c543815d9defc3b7192354539b6c (patch) | |
| tree | 0df3bafdb245f580029ba54f86313fdb609b6de0 /open-file | |
| parent | bea38c1ce49b5e5e60e4e9f9261ec176ff59cd3c (diff) | |
| download | scripts-5ac980dec555c543815d9defc3b7192354539b6c.tar.gz scripts-5ac980dec555c543815d9defc3b7192354539b6c.zip | |
Fixed open-file, changed a bit open-stdin
Diffstat (limited to 'open-file')
| -rwxr-xr-x | open-file | 1 |
1 files changed, 1 insertions, 0 deletions
| @@ -20,6 +20,7 @@ xedit=${XEDITOR:-gedit} | |||
| 20 | 20 | ||
| 21 | openfile() { | 21 | openfile() { |
| 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)" |
