Skip to content

Instantly share code, notes, and snippets.

View patzearfoss's full-sized avatar

Pat Zearfoss patzearfoss

View GitHub Profile
@ZevEisenberg
ZevEisenberg / apple-dev.zsh
Created July 22, 2017 03:07
Utility functions for doing iOS and Mac development
# cd to the folder containing an Xcode project dragged from an Xcode window's proxy icon. If no file is provided, cd to the folder containing the current Xcode project
function xc
{
xcodeIsRunning=false
if [[ `osascript -e 'tell app "System Events" to count processes whose name is "Xcode"'` == 1 ]]; then
xcodeIsRunning=true
fi
if [[ $xcodeIsRunning == false ]]; then
echo "Xcode is not open. I don’t know what you want from me."