diff options
author | Marc Cornellà <marc.cornella@live.com> | 2015-09-04 01:43:48 +0200 |
---|---|---|
committer | Marc Cornellà <marc.cornella@live.com> | 2015-09-05 22:47:52 +0200 |
commit | 6a830f39b68300cf86504f1c60d9ab77c09b7971 (patch) | |
tree | ee0ff0234aa735c8dab6904e2f4de7017b9006c7 /plugins/xcode | |
parent | cbdad588e65f4205fcdc4e34e97b04fa7fdb5457 (diff) | |
download | zsh-6a830f39b68300cf86504f1c60d9ab77c09b7971.tar.gz zsh-6a830f39b68300cf86504f1c60d9ab77c09b7971.tar.bz2 zsh-6a830f39b68300cf86504f1c60d9ab77c09b7971.zip |
Return error if no xcode files where found
Diffstat (limited to 'plugins/xcode')
-rw-r--r-- | plugins/xcode/xcode.plugin.zsh | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/plugins/xcode/xcode.plugin.zsh b/plugins/xcode/xcode.plugin.zsh index 4aa6bfc9b..274bd92e4 100644 --- a/plugins/xcode/xcode.plugin.zsh +++ b/plugins/xcode/xcode.plugin.zsh @@ -2,8 +2,10 @@ function xc { local xcode_proj xcode_proj=(*.{xcworkspace,xcodeproj}(N)) + if [[ ${#xcode_proj} -eq 0 ]]; then echo "No xcworkspace/xcodeproj file found in the current directory." + return 1 else echo "Found ${xcode_proj[1]}" open "${xcode_proj[1]}" |