Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- More robust version of https://gist.github.com/2006738
- tell application "BBEdit" to set theFile to file of document 1
- tell application "Finder" to set theFolder to (container of file theFile) as alias
- set theUnixPath to POSIX path of theFolder
- tell application "iTerm"
- activate
- set myterm to (make new terminal)
- tell myterm
- launch session "Default"
- tell the last session
- write text "pushd \"" & theUnixPath & "\"" & "&& clear"
- end tell
- end tell
- end tell
Advertisement
Add Comment
Please, Sign In to add comment