How to launch Xcode in macos catalina terminal zsh

Apple changed the default shell to ZSH. So I would like to run Xcode in the Terminal. So here is the brief instruction for you.

  1. Open .zshrc file vim ~/.zshrc
  2. Add an alias at the bottom. alias xcode="open -a Xcode"
  3. Source .zshrc or relaunch the terminal source ~/.zshrc
  4. Run the command using the alias. xcode example.xcworkspace

Leave a Reply