Created
October 8, 2017 20:39
-
-
Save natecook1000/7ff05fbc6062507b2b34961be39a0ac2 to your computer and use it in GitHub Desktop.
Open new Terminal tab with frontmost Finder window
This file contains hidden or 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
| on run | |
| tell application "Finder" to set myDir to POSIX path of (insertion location as alias) | |
| tell application "Terminal" | |
| activate | |
| if not (exists window 1) then | |
| reopen | |
| else | |
| tell application "System Events" to keystroke "t" using command down | |
| end if | |
| do script "cd " & quoted form of myDir in window 1 | |
| end tell | |
| end run |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment