SHOW:
|
|
- or go back to the newest paste.
| 1 | tell application "BBEdit" to set theFile to file of document 1 | |
| 2 | tell application "Finder" to set theFolder to (container of file theFile) as alias | |
| 3 | set theUnixPath to POSIX path of theFolder | |
| 4 | ||
| 5 | tell application "iTerm" | |
| 6 | activate | |
| 7 | set myterm to (make new terminal) | |
| 8 | tell myterm | |
| 9 | launch session "Default" | |
| 10 | tell the last session | |
| 11 | write text "pushd \"" & theUnixPath & "\"" & "&& clear" | |
| 12 | end tell | |
| 13 | end tell | |
| 14 | end tell |