Matt Gemmell

My new book CHANGER is out now!

An action-adventure novel — book 1 in the KESTREL series.

★★★★★ — Amazon

I'm feeling lucky

Development & Source 1 min read

A couple of development-related notes.

First up, there’s a new version of iTableColumnHeader (on Ye Olde Cocoa Source Code page). Thanks to Heinrich Giesen at the ACM for allowing my laziness in fixing the crash-on-resize bug to proceed no further.

Second up, Spotlight is sweet, but let’s face it: the Spotlight menu can be pretty slow. I often just want to launch apps by name with it, so I wrote a shell (tcsh) script to do that. What it does is takes one or more arguments that are case-insensitive names (or partial names, using begins-with matching) of applications in your /Applications/ folder or any subfolder thereof. It then Spotlight-finds them (using the command-line interface to spotlight, “mdfind”), sorts the results alphabetically, and launches the top match.

If you edit the shell script you can readily change the type of file it looks for, the path to search in, how many of the topmost matches to launch, and so on. I named it “lucky”, after Google’s “I Feel Lucky” button, which has a vaguely analogous function. So, you can type: “lucky ic te ad” to launch iCal, TextEdit and Address Book. Possibly useful. Grab it here.

Cheers to Derek for the tutorial on using xargs, by the way. Once he goes off to Edinburgh, I might have to resort to using Google to look stuff up.