From: Andrew Lorimer Date: Wed, 28 Nov 2018 07:13:11 +0000 (+1100) Subject: Merge branch 'master' of ssh://charles/tank/andrew/code/scripts X-Git-Url: https://git.lorimer.id.au/scripts.git/diff_plain/02cf747f6eb62d12d80d1115b2b7f863a6adbc69?hp=f9c7f592e40d1f760a83c85f80bc43a39b7bbe63 Merge branch 'master' of ssh://charles/tank/andrew/code/scripts --- diff --git a/macopen.sh b/macopen.sh index 51d2746..69909b7 100755 --- a/macopen.sh +++ b/macopen.sh @@ -1,21 +1,10 @@ #! /bin/bash -#include -#include +# 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