Skip to content

Instantly share code, notes, and snippets.

@bryanluby
Last active December 25, 2015 10:58
Show Gist options
  • Save bryanluby/6965064 to your computer and use it in GitHub Desktop.
Save bryanluby/6965064 to your computer and use it in GitHub Desktop.
Change Terminal 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;'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment