From ad9bf4659ee72153a10c70869a1b210a6df4f4b2 Mon Sep 17 00:00:00 2001 From: Shady Date: Thu, 7 Nov 2013 20:26:38 -0800 Subject: [PATCH] # This is a combination of 3 commits. # The first commit's message is: some useful xcode command line stuff # This is the 2nd commit message: fix the param to print info # This is the 3rd commit message: added function to swith path, renamed print --- custom/xcode.plugin.zsh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 custom/xcode.plugin.zsh diff --git a/custom/xcode.plugin.zsh b/custom/xcode.plugin.zsh new file mode 100644 index 000000000..e5a5aa321 --- /dev/null +++ b/custom/xcode.plugin.zsh @@ -0,0 +1,18 @@ +function xc { + xcode_proj=`find . -name "*.xc*" -d 1 | sort -r | head -1` + + if [[ `echo -n $xcode_proj | wc -m` == 0 ]] + then + echo "No xcworkspace/xcodeproj file found in the current directory." + else + echo "Found $xcode_proj" + open "$xcode_proj" + fi +} + +function xcsel { + sudo xcode-select --switch "$*" +} + +alias xcb='xcodebuild' +alias xcp='xcode-select --print-path'