Skip to content

Instantly share code, notes, and snippets.

@rwilcox
Created March 13, 2012 12:42
Show Gist options
  • Save rwilcox/2028536 to your computer and use it in GitHub Desktop.
Save rwilcox/2028536 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
@rwilcox
Copy link
Author

rwilcox commented Mar 13, 2012

Copy this text into Applescript Editor, Save as Script your Application Support/BBEdit/Scripts folder. (This is located in your Library folder by default, but also could be in your Dropbox).

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