robrix (owner)

Revisions

gist: 141808 Download_button fork
public
Description:
Select the passed-in paths in the Finder.
Public Clone URL: git://gist.github.com/141808.git
select_in_finder
1
2
3
4
5
6
#!/usr/bin/env ruby -rubygems
# pass this script some paths, e.g. `find . -name '*.m' | select_in_finder` and it will select them in the Finder. Works best with List View.
require "appscript"
Appscript::app('Finder').selection.set(STDIN.readlines.collect do |line|
MacTypes::FileURL.path(line.strip).to_alias
end)