Created
March 13, 2012 12:42
-
-
Save rwilcox/2028536 to your computer and use it in GitHub Desktop.
BBEdit Script to Open Here In Shell Worksheet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
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).