Created
August 1, 2013 06:30
-
-
Save anagri/6128893 to your computer and use it in GitHub Desktop.
Applescript to Open Selected Folder in iTerm
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
tell application "Finder" | |
set myWin to window 1 | |
set theWin to (quoted form of POSIX path of (target of myWin as alias)) | |
tell application "iTerm" | |
make new terminal | |
tell the first terminal | |
activate current session | |
launch session "Default Session" | |
tell the last session | |
write text "cd " & theWin | |
end tell | |
end tell | |
end tell | |
end tell | |
tell application "Finder" | |
activate | |
end tell | |
tell application "iTerm" | |
activate | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment