Last active
November 11, 2016 17:38
-
-
Save CavalcanteLeo/e5d492319a231654524422e5c5088dc0 to your computer and use it in GitHub Desktop.
Open xcode from terminal
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
function xc { | |
bold=$(tput bold) | |
normal=$(tput sgr0) | |
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 "Opening ${bold}\033[1;32m$xcode_proj" | |
open "$xcode_proj" | |
fi | |
} |
Author
CavalcanteLeo
commented
Nov 11, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment