From 447db36d6eb9c00555b2380f50173556fe53e4f1 Mon Sep 17 00:00:00 2001 From: John Regner Date: Sun, 31 Jan 2016 11:14:41 -0800 Subject: [PATCH] improve style, allow space in paths changed Parameter expansion to use the convention already in this pluging. Also surrounded application path in quotes, just incase. --- plugins/xcode/xcode.plugin.zsh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/xcode/xcode.plugin.zsh b/plugins/xcode/xcode.plugin.zsh index 9f93060a..a7912926 100644 --- a/plugins/xcode/xcode.plugin.zsh +++ b/plugins/xcode/xcode.plugin.zsh @@ -14,8 +14,9 @@ function xc { return 1 else echo "Found ${xcode_proj[1]}" - XCODEPATH=`xcode-select -p` - open -a ${XCODEPATH%/*/*} "${xcode_proj[1]}" + active_path=$(xcode-select -p) + active_path=${active_path%%/Contents/Developer*} + open -a "${active_path}" "${xcode_proj[1]}" fi }