Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save extratone/3f4e334077f092272bdc825c34be5883 to your computer and use it in GitHub Desktop.

Select an option

Save extratone/3f4e334077f092272bdc825c34be5883 to your computer and use it in GitHub Desktop.
BBEdit Script to Open Here In Shell Worksheet
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
set output to return & "cd '" & theUnixPath & "'; pwd"
tell application "BBEdit"
set uws to Unix worksheet window
tell uws
select insertion point after last character
set selection to output
select
end tell
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment