Skip to content

Instantly share code, notes, and snippets.

@soundsmitten
Forked from rwilcox/open_here.applescript
Last active August 29, 2015 13:58
Show Gist options
  • Select an option

  • Save soundsmitten/9998460 to your computer and use it in GitHub Desktop.

Select an option

Save soundsmitten/9998460 to your computer and use it in GitHub Desktop.
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"
activate
set myTerm to (make new terminal)
tell myTerm
launch session "Default"
set _session to current session
end tell
tell _session
write text "pushd \"" & theUnixPath & "\""
end tell
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment