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.
This commit is contained in:
John Regner 2016-01-31 11:14:41 -08:00
parent fbf601eb6d
commit 447db36d6e

View File

@ -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
}