Skip to content

Instantly share code, notes, and snippets.

@mmorey
Forked from subdigital/xc
Last active December 16, 2015 11:49
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mmorey/5429911 to your computer and use it in GitHub Desktop.
Save mmorey/5429911 to your computer and use it in GitHub Desktop.
Find xcode project/workspace in current folder and open it
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