summaryrefslogtreecommitdiff
path: root/plugins/xcode/xcode.plugin.zsh
diff options
context:
space:
mode:
authorNeal <neal@ineal.me>2014-10-27 22:17:11 -0500
committerNeal <neal@ineal.me>2014-10-27 22:17:26 -0500
commit071de5fb39ff951bffe75a4d6f590d85f25871f3 (patch)
tree442eb33c521195a3169c556878cbbc525f978dd3 /plugins/xcode/xcode.plugin.zsh
parentd794a502f6e551c2ccb1479fc68dbae352c839f5 (diff)
downloadzsh-071de5fb39ff951bffe75a4d6f590d85f25871f3.tar.gz
zsh-071de5fb39ff951bffe75a4d6f590d85f25871f3.tar.bz2
zsh-071de5fb39ff951bffe75a4d6f590d85f25871f3.zip
Make the simulator alias work with older Xcode versions as well.
Diffstat (limited to 'plugins/xcode/xcode.plugin.zsh')
-rw-r--r--plugins/xcode/xcode.plugin.zsh7
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/xcode/xcode.plugin.zsh b/plugins/xcode/xcode.plugin.zsh
index 3d7781bf9..b7b75cf93 100644
--- a/plugins/xcode/xcode.plugin.zsh
+++ b/plugins/xcode/xcode.plugin.zsh
@@ -16,4 +16,9 @@ function xcsel {
alias xcb='xcodebuild'
alias xcp='xcode-select --print-path'
-alias simulator='open $(xcode-select -p)/Applications/iOS\ Simulator.app'
+
+if [[ -d $(xcode-select -p)/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app ]]; then
+ alias simulator='open $(xcode-select -p)/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app'
+else
+ alias simulator='open $(xcode-select -p)/Applications/iOS\ Simulator.app'
+fi