Guest User

BBEdit - Go Here in iTerm

a guest
Jun 11th, 2012
266
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- More robust version of https://gist.github.com/2006738
  2.  
  3. tell application "BBEdit" to set theFile to file of document 1
  4. tell application "Finder" to set theFolder to (container of file theFile) as alias
  5. set theUnixPath to POSIX path of theFolder
  6.  
  7. tell application "iTerm"
  8.     activate
  9.     set myterm to (make new terminal)
  10.     tell myterm
  11.         launch session "Default"
  12.         tell the last session
  13.             write text "pushd  \"" & theUnixPath & "\"" & "&& clear"
  14.         end tell
  15.     end tell
  16. end tell
Advertisement
Add Comment
Please, Sign In to add comment