Skip to content

Instantly share code, notes, and snippets.

@ldrr
Last active March 28, 2019 09:29
Show Gist options
  • Save ldrr/4272183df998ca976c654cdee8b6af48 to your computer and use it in GitHub Desktop.
Save ldrr/4272183df998ca976c654cdee8b6af48 to your computer and use it in GitHub Desktop.
openx by @orta
# Xcode via @orta
openx(){
if test -n "$(find . -maxdepth 1 -name '*.xcworkspace' -print -quit)"
then
echo "Opening workspace"
open *.xcworkspace
return
else
if test -n "$(find . -maxdepth 1 -name '*.xcodeproj' -print -quit)"
then
echo "Opening project"
open *.xcodeproj
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