Skip to content

Instantly share code, notes, and snippets.

@dev4dev dev4dev/.profile
Created Nov 10, 2014

Embed
What would you like to do?
Function for opening Xcode workspace/project
xc() {
WORKSPACE=$(ls -dt *.xcworkspace 2>/dev/null | head -n 1)
PROJECT=$(ls -dt *.xcodeproj 2>/dev/null | head -n 1)
if [[ $WORKSPACE != '' ]]; then
open $WORKSPACE
elif [[ $PROJECT != '' ]]; then
open $PROJECT
else
echo 'R U SROUS?'
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.