Looking for zsh completion file for osX native commands

I've been digging deep into what actually comes with osX in /usr/bin and especially /usr/libexec.

Quite good stuff really, although the command syntax is a bit.. odd.

Let me direct the curious to the command that made me think of this:

networksetup -printcommands

I can not think of a command that better illustrates the need for good completion.

security -h 

perhaps, but those commands have a familiar easy-to-read format.

I beseech the community, please point me to a place where I can find such a thing. I never type them right, and I ache for tab completion for this

Anyone have any idea where I could grab something? I'd prefer to stand on the shoulders of giants instead of trying to make a zsh/bash completion script leap into the world, ready for battle, like Athena, from my forehead.

I am no Zeus when it comes to compctl. Not at all.


This project has a number of completions for Mac-specific commands (neither of the two you mentioned, but it does have others like defaults, hdiutil, launchctl, mdls, open, and others), as well as a lot of other command-line functions and utilities:

http://code.google.com/p/zsh-templates-osx/

There's a lot of Mac development and system utilities that don't have completions defined yet (libtool, pkgutil, otool; the ones you mentioned); hopefully the project maintainer is active and accepts contributions.