Skip to content

Instantly share code, notes, and snippets.

@rwilcox
Created March 9, 2012 14:26
Show Gist options
  • Save rwilcox/2006738 to your computer and use it in GitHub Desktop.
Save rwilcox/2006738 to your computer and use it in GitHub Desktop.
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
@brandonpittman
Copy link

This script errors when there isn't a terminal already open.

@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