Created
November 10, 2014 18:45
-
-
Save dev4dev/978e6e21db95f86da4f8 to your computer and use it in GitHub Desktop.
Function for opening Xcode workspace/project
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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