Skip to content

Instantly share code, notes, and snippets.

View unforswearing's full-sized avatar

Alvin Charity unforswearing

View GitHub Profile
@unforswearing
unforswearing / finderservices.applescript
Created November 24, 2014 00:54
Finder Services Alfred workflow script
on alfred_script(q)
# set q to text returned of (display dialog "q" default answer "")
# (the above line can be uncommented if you want to use the script as an application or something similar)
if q is "read" then
# read file
tell application "Finder"
set ffile to selection as text
set ffile to quoted form of POSIX path of ffile
set the clipboard to (do shell script "cat " & ffile)
end tell