From 2f6953f5f401a357f6f6c28f36d863c664228894 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Fri, 29 May 2015 14:44:13 +0100 Subject: [PATCH] Add missing quotation and prevent globbing, word splitting and whitespace problems. --- resources/terminal | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/terminal b/resources/terminal index 3ec0f0d10d..1283f7ec0b 100755 --- a/resources/terminal +++ b/resources/terminal @@ -42,13 +42,13 @@ function open_terminal () { delay 0.4 tell application "System Events" to keystroke "t" using command down tell application "Terminal" - do script "bash -c \"$CMD\" in window 1 + do script "bash -c \"$CMD\"" in window 1 end tell EOF } -if [ $ITERM_EXISTS == "true" ]; then - open_iterm $* || open_terminal $* +if [ "$ITERM_EXISTS" == "true" ]; then + open_iterm "$@" || open_terminal "$@" else - open_terminal $* + open_terminal "$@" fi