From 05bf6a58a2d4867afc910fc5fbac2d9ad3c3e584 Mon Sep 17 00:00:00 2001 From: Chris Martin Date: Tue, 5 Nov 2013 08:37:34 -0800 Subject: [PATCH 1/4] first pass at some useful xcode stuff --- custom/xcode.plugin.zsh | 13 +++++++++++++ 1 file changed, 13 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..0ccdf6713 --- /dev/null +++ b/custom/xcode.plugin.zsh @@ -0,0 +1,13 @@ +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 +} + +alias xcb='xcodebuild' +alias xcs='xcode-select -p' From 3ccb27b70efd71c393913b0a5be1c45213309de0 Mon Sep 17 00:00:00 2001 From: Chris Martin Date: Tue, 5 Nov 2013 10:42:19 -0800 Subject: [PATCH 2/4] fix the param to print info --- custom/xcode.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom/xcode.plugin.zsh b/custom/xcode.plugin.zsh index 0ccdf6713..5736c760b 100644 --- a/custom/xcode.plugin.zsh +++ b/custom/xcode.plugin.zsh @@ -10,4 +10,4 @@ function xc { } alias xcb='xcodebuild' -alias xcs='xcode-select -p' +alias xcs='xcode-select --print-path' From 2dcd950218dc4fb651af8d0bbf06ad1669f178bc Mon Sep 17 00:00:00 2001 From: Chris Martin Date: Tue, 5 Nov 2013 11:12:06 -0800 Subject: [PATCH 3/4] added function to swith path, renamed print --- custom/xcode.plugin.zsh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/custom/xcode.plugin.zsh b/custom/xcode.plugin.zsh index 5736c760b..c10d89d96 100644 --- a/custom/xcode.plugin.zsh +++ b/custom/xcode.plugin.zsh @@ -9,5 +9,9 @@ function xc { fi } +function xcsel { + sudo xcode-select --switch "$*" +} + alias xcb='xcodebuild' -alias xcs='xcode-select --print-path' +alias xcp='xcode-select --print-path' From f45626a57bbd80825745fbd837eb966f4f0b524a Mon Sep 17 00:00:00 2001 From: Chris Martin Date: Tue, 5 Nov 2013 11:24:21 -0800 Subject: [PATCH 4/4] moved to the plugin folder --- {custom => plugins/xcode}/xcode.plugin.zsh | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {custom => plugins/xcode}/xcode.plugin.zsh (100%) diff --git a/custom/xcode.plugin.zsh b/plugins/xcode/xcode.plugin.zsh similarity index 100% rename from custom/xcode.plugin.zsh rename to plugins/xcode/xcode.plugin.zsh