summaryrefslogtreecommitdiff
path: root/plugins/xcode/xcode.plugin.zsh
diff options
context:
space:
mode:
authorDawid Ferenczy <dawid@ferenczy.cz>2015-08-25 16:34:04 +0200
committerDawid Ferenczy <dawid@ferenczy.cz>2015-08-25 16:34:04 +0200
commit18ef1ee6481dbeca4fbecf3de627f946860ffd5a (patch)
treecb07e72538c470bb486596d955c7912c5b05e23e /plugins/xcode/xcode.plugin.zsh
parenteafd5f325208421b82a770e57441dd1063eb5745 (diff)
parent192de6bcffb0294e19f4203f6f7dc1a7f3e427be (diff)
downloadzsh-18ef1ee6481dbeca4fbecf3de627f946860ffd5a.tar.gz
zsh-18ef1ee6481dbeca4fbecf3de627f946860ffd5a.tar.bz2
zsh-18ef1ee6481dbeca4fbecf3de627f946860ffd5a.zip
Merge remote-tracking branch 'robbyrussell/master'
Diffstat (limited to 'plugins/xcode/xcode.plugin.zsh')
-rw-r--r--plugins/xcode/xcode.plugin.zsh10
1 files changed, 8 insertions, 2 deletions
diff --git a/plugins/xcode/xcode.plugin.zsh b/plugins/xcode/xcode.plugin.zsh
index 4816ab0ed..1d1205b80 100644
--- a/plugins/xcode/xcode.plugin.zsh
+++ b/plugins/xcode/xcode.plugin.zsh
@@ -1,6 +1,6 @@
#xc function courtesy of http://gist.github.com/subdigital/5420709
function xc {
- xcode_proj=`find . -name "*.xc*" -d 1 | sort -r | head -1`
+ xcode_proj=`ls | grep "\.xc" | sort -r | head -1`
if [[ `echo -n $xcode_proj | wc -m` == 0 ]]
then
echo "No xcworkspace/xcodeproj file found in the current directory."
@@ -16,4 +16,10 @@ function xcsel {
alias xcb='xcodebuild'
alias xcp='xcode-select --print-path'
-alias simulator='open $(xcode-select -p)/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app'
+alias xcdd='rm -rf ~/Library/Developer/Xcode/DerivedData/*'
+
+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