Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Open Here in Current iTerm Tab
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"
tell current session of current terminal
write text "pushd \"" & theUnixPath & "\""
end tell
activate
end tell
@avilior
Copy link

avilior commented Oct 27, 2018

You can now do the following to launch iTerm2 from BBEdit:

defaults write com.barebones.bbedit TerminalBundleID -string "com.googlecode.iterm2"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment