Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save florido/5fa53dfc92d245eaa80d006a62c30221 to your computer and use it in GitHub Desktop.
Save florido/5fa53dfc92d245eaa80d006a62c30221 to your computer and use it in GitHub Desktop.
For use with TextExpander. Get contents of selected file, copy and paste. I have it set with ",,pbpaste" in TextExpander.
tell application "Finder"
set sel to the selection as text
set fPath to quoted form of POSIX path of sel
do shell script ("cat " & fPath & " | pbcopy && pbpaste")
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment