Skip to content

Instantly share code, notes, and snippets.

@awksedperl
awksedperl / Go here in iTerm2.scpt
Created May 2, 2018 22:55 — forked from ideabucket/Go here in iTerm2.scpt
"Go Here in iTerm2" handler for BBEdit
-- based on http://pastebin.com/MSPZWWAj
-- which was in turn based on https://gist.github.com/2006738
-- but will open a new tab in the current terminal if one is open, rather than always creating a new terminal
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"
if exists current window then