Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Completion for `sub-options'



Hello there!

I began to write a zsh completion for a little httpd. I saw then, that it isn't as easy as i thought, because the program hasn't regular options, it has `sub-options', too. The example would be:

zsh%  program --errordoc 404=/var/www/foobar.html

First it should make the completion for the error code, what is trivial to make (401, 404, etc...). The second thing, it should put a `=' after the error-code completion and then look for  _files -g '*.(html|htm|php|etc...)'. 

I looked into several completions of programs that have such options, too (i.e. like mount), but i couldn't make it work.  If someone can give me an easy solution for this problem, I would be very thankful.

Thanks,
Istvan Sebestyen



Messages sorted by: Reverse Date, Date, Thread, Author