Last active
January 15, 2019 14:10
-
-
Save datMaffin/b47145c719303e45abcbc1ae31756e41 to your computer and use it in GitHub Desktop.
AppleScript for opening a single new Terminal.app window at the location `input`
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
set posix_input to POSIX path of input | |
if application "Terminal" is running then | |
tell application "Terminal" | |
open posix_input | |
activate | |
end tell | |
else | |
tell application "Terminal" | |
if not (exists window 1) then reopen | |
activate | |
do script "cd \"" & posix_input & "\"" in window 1 | |
end tell | |
end if |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment