Skip to content

Instantly share code, notes, and snippets.

@lamdor
Created October 28, 2009 03:38
Show Gist options
  • Select an option

  • Save lamdor/220212 to your computer and use it in GitHub Desktop.

Select an option

Save lamdor/220212 to your computer and use it in GitHub Desktop.
#!/usr/bin/ruby
ARGV.each do |file|
file = File.expand_path(file)
script = <<EOS
set theFile to POSIX file "#{file}"
tell application "Finder"
reveal theFile
activate
end tell
EOS
system "osascript -e '#{script}'"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment