Skip to content

Instantly share code, notes, and snippets.

@fassko
Last active May 21, 2023 14:09
Show Gist options
  • Save fassko/0e4cc42308a90afdccbd1c46e95eb72a to your computer and use it in GitHub Desktop.
Save fassko/0e4cc42308a90afdccbd1c46e95eb72a to your computer and use it in GitHub Desktop.

In terminal:

    nano ~/.bash_profile

Place the following in the opened file:

    # Open Xcode workspace from terminal.
    alias workspace='open -a "/Applications/Xcode.app" *.xcworkspace'
    alias project='open -a "/Applications/Xcode.app" *.xcodeproj'

Control X to close the file and Y to save it. Then press Enter.

Quit the Terminal and relaunch it for the changes to take effect.

  • Inside a directory with a .xcworkspace file use the command workspace to open Xcode.
  • Inside a directory with a .xcodeproj file use the command project to open Xcode.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment