Andrew's git
/
scripts.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'master' of ssh://charles/tank/andrew/code/scripts
author
Andrew Lorimer
<andrew@lorimer.id.au>
Wed, 28 Nov 2018 07:13:11 +0000
(18:13 +1100)
committer
Andrew Lorimer
<andrew@lorimer.id.au>
Wed, 28 Nov 2018 07:13:11 +0000
(18:13 +1100)
macopen.sh
patch
|
blob
|
history
raw
(from parent 2:
f9c7f59
)
diff --git
a/macopen.sh
b/macopen.sh
index 51d2746f62e56f76a4be681d5e01d8fbdd0791da..69909b79b7696ca162e47405425a56113e56618a 100755
(executable)
--- a/
macopen.sh
+++ b/
macopen.sh
@@
-1,21
+1,10
@@
#! /bin/bash
-#include <sys/param.h>
-#include <stdlib.h>
+# wrapper for apple's shitty `open` command
exe=$1
-files=${@:2}
-path=''
+shift
-resolve() {
- path=$(realpath $1)
- echo $1
-}
-
-#$(open -a $1
-
-for f in $files
-do
- open -a $exe $(resolve $f)
- echo $(resolve $f)
+for f; do
+ open -a $exe "$(grealpath "$f")"
done