Skip to content

Instantly share code, notes, and snippets.

@delebedev
Created March 19, 2014 13:58
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save delebedev/9642175 to your computer and use it in GitHub Desktop.
Save delebedev/9642175 to your computer and use it in GitHub Desktop.
Opens Xcode workspace or project with AppCode.
opena(){
if test -n "$(find . -maxdepth 1 -name '*.xcworkspace' -print -quit)"
then
echo "Opening workspace"
open *.xcworkspace -a /Applications/AppCode.app
return
else
if test -n "$(find . -maxdepth 1 -name '*.xcodeproj' -print -quit)"
then
echo "Opening project"
open *.xcodeproj -a /Applications/AppCode.app
return
else
echo "Nothing found"
fi
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment