Skip to content

Instantly share code, notes, and snippets.

@vinhnx
Created May 18, 2014 16:43
Show Gist options
  • Save vinhnx/cde00bb6f51e3bd7ae5d to your computer and use it in GitHub Desktop.
Save vinhnx/cde00bb6f51e3bd7ae5d to your computer and use it in GitHub Desktop.
Open the first Xcode workspace or project found. Put this in your .zshrc file
# thanks https://gist.github.com/subdigital/5420709#comment-864932
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
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment