Guest User

BBEdit - Go Here in iTerm

a guest
Jun 11th, 2012
31
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
Advertisement
Add Comment
Please, Sign In to add comment