From 3273c7f76f82c880eaba30726bf1a5f174d59b42 Mon Sep 17 00:00:00 2001 From: Andrew Lorimer Date: Wed, 28 Nov 2018 18:12:49 +1100 Subject: [PATCH] deal with spaces in macopen.sh --- macopen.sh | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) 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 -- 2.43.2