Created
October 10, 2011 01:31
-
-
Save vividtone/1274455 to your computer and use it in GitHub Desktop.
open new iTerm tab and change directory.
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
#!/usr/bin/osascript | |
# open new iTerm tab and change directory. | |
set current_dir to do shell script "pwd" | |
tell application "iTerm" | |
tell application "System Events" | |
tell process "iTerm" to keystroke "t" using command down | |
end tell | |
tell the current terminal | |
tell the last session | |
write text "cd " & current_dir | |
end tell | |
end tell | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment