Last active
May 15, 2019 21:44
-
-
Save kevin-funderburg/8a18c46a8e1c5759ee965b4f8bba2f97 to your computer and use it in GitHub Desktop.
Open current Finder folder in iTerm2
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
tell application "Finder" | |
set myWin to window 1 | |
set theWin to (quoted form of POSIX path of (target of myWin as alias)) | |
end tell | |
tell application "iTerm" | |
set w to create window with profile "Default" | |
tell w's current session to write text "cd " & theWin & " && clear" | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment