Terminal: Change directory to frontmost Xcode project window
# Works best when an Xcode project is already open.
# Full Terminal command:
cd `osascript -e "tell application \"Xcode\" to get project directory of front project"`; pwd;
# Optional: Add this as an alias to .bash_profile. Then type "xt" in Terminal to invoke the command.
alias xt='cd `osascript -e "tell application \"Xcode\" to get project directory of front project"`; pwd;'