spotlight.rb

Last updated: 11/26/2006

spotlight.rb is a script that allows you to perform Spotlight searches and launch items returned by those searches from the command line. I’m not sure if it will actually be useful to anyone. I just thought it would be fun to make.

If you’d like to try it out:

  1. Make sure you’re running Mac OS X 10.4 or later
  2. Download the program
  3. Unzip the archive
  4. Open a terminal window and change the directory to the location of the program
  5. Type ruby spotlight.rb

The program understands the following commands (followed by the return key):

  • s or search: Searches Spotlight for the string following the command. For example, s opml.
  • f or forward: Displays the next twenty results of the search.
  • b or back: Displays the previous twenty results of the search.
  • q or quit: Ends the program.
  • To launch one of the results of the search, simply type the number of the result.

This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.

Creative Commons License