Last active
November 10, 2022 02:31
-
-
Save MarcoEidinger/50bbd42a42d3c698193167b55a343c1c to your computer and use it in GitHub Desktop.
Open iTerm from Xcode (optimized)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Optimized as using
$SRCROOT
only works well for project/workspace but not for a Swift package