diff options
author | Thi <thii@users.noreply.github.com> | 2018-07-20 00:20:45 +0900 |
---|---|---|
committer | Marc Cornellà <marc.cornella@live.com> | 2018-07-19 17:20:45 +0200 |
commit | 6ca57e035cc7c199ca7c1d893594270ec570f4d3 (patch) | |
tree | 8ac1bd73cb4e74827288b964d39df372bc4c6591 /plugins/xcode/xcode.plugin.zsh | |
parent | 626b30b2a3d99a03058fea167281163d8d96d6f9 (diff) | |
download | zsh-6ca57e035cc7c199ca7c1d893594270ec570f4d3.tar.gz zsh-6ca57e035cc7c199ca7c1d893594270ec570f4d3.tar.bz2 zsh-6ca57e035cc7c199ca7c1d893594270ec570f4d3.zip |
[plugins/xcode] Fix opening project using a wrong Xcode version (#6829)
Diffstat (limited to 'plugins/xcode/xcode.plugin.zsh')
-rw-r--r-- | plugins/xcode/xcode.plugin.zsh | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/xcode/xcode.plugin.zsh b/plugins/xcode/xcode.plugin.zsh index b46e05f2f..b80c3e36d 100644 --- a/plugins/xcode/xcode.plugin.zsh +++ b/plugins/xcode/xcode.plugin.zsh @@ -22,8 +22,11 @@ function xc { fi return 1 else - echo "Found ${xcode_proj[1]}" - open "${xcode_proj[1]}" + local active_path + active_path=$(xcode-select -p) + active_path=${active_path%%/Contents/Developer*} + echo "Found ${xcode_proj[1]}. Opening with ${active_path}" + open -a "$active_path" "${xcode_proj[1]}" fi } |