Skip to content

Instantly share code, notes, and snippets.

@MarcoEidinger
Last active November 10, 2022 02:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MarcoEidinger/50bbd42a42d3c698193167b55a343c1c to your computer and use it in GitHub Desktop.
Save MarcoEidinger/50bbd42a42d3c698193167b55a343c1c to your computer and use it in GitHub Desktop.
Open iTerm from Xcode (optimized)
#!/bin/sh
dir="$PWD"
# remove a potential suffix in case Xcode shows a Swift Package
suffix="/.swiftpm/xcode"
dir=${dir//$suffix/}
open -a iterm "$dir"
@MarcoEidinger
Copy link
Author

Optimized as using $SRCROOT only works well for project/workspace but not for a Swift package

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment