Skip to content

Instantly share code, notes, and snippets.

View spkane's full-sized avatar
👣
Dreaming of walking barefoot in the sand.

Sean P. Kane spkane

👣
Dreaming of walking barefoot in the sand.
View GitHub Profile
-- Adapted from these sources:
-- http://peterdowns.com/posts/open-iterm-finder-service.html
-- https://gist.github.com/cowboy/905546
--
-- Modified to work with files as well, cd-ing to their container folder
on run {input, parameters}
tell application "Finder"
set my_file to first item of input
set filetype to (kind of (info for my_file))
-- Treats OS X applications as files. To treat them as folders, integrate this SO answer: