Files
Rust-BBEdit/Contents/Scripts/Cargo/doc.applescript
2015-12-08 07:29:07 +00:00

18 lines
417 B
AppleScript
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
tell application "BBEdit"
tell front text document
if modified = true then
save its document
end if
set the_file to its file
if the_file ­ missing value then
set the_path to POSIX path of ((the_file as text) & "::")
else
error "Document does not point to a file"
end if
end tell
end tell
tell application "Terminal"
do script "cd " & (quoted form of the_path) & "; cargo doc --open"
end tell