-- New Shell Worksheet -- https://c-command.com/scripts/bbedit/shell-worksheet -- Summary: Makes a shell worksheet for working on the current window’s file. -- Requires: BBEdit 6.5 -- Install Location: -- Last Modified: 2019-05-24 tell application "BBEdit" if class of window 1 is disk browser window then set s to selection of window 1 set f to alias 1 of s else set f to file of window 1 end if end tell tell application "Finder" set c to f's container as alias set p to POSIX path of c end tell tell application "BBEdit" make new UNIX worksheet window with properties {working directory:p} end tell