Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
compctl is old school. zstyle nicer. Gonna try, as I am all alone out here apparently ;) – chiggsy Nov 30 '10 at 8:41
It's not that much nicer. Got the basics for networksetup. Odd, I would ordinarily hate zsh by now, but the very little I dug out of that byzantine manpage makes zsh so much sweeter... How I wish I could walk away from this sort of thing.... – chiggsy Dec 4 '10 at 2:17
+1: Mind sharing what you have so far? – Miles Jan 30 '11 at 5:07
Certainly. At least it tab completes on the myriad switches... I'll clean it up and upload this am. – chiggsy Jan 30 '11 at 16:09

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:

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.