http://pastebin.com/mR8y1Rks
Note it's the only tab completion script I've written, and it's probably a hack :P
Reply on news.ycombinator.com