On Tue, Oct 07, 2014 at 05:28:52PM +0200, Oliver Kiddle wrote: [snip] > > At least based on the documentation, _alternative is supposed to take > _arguments like specifications. Apparently it works with a list of > functions as you have done. An example would be: > > _alternative \ > 'additional-commands:additional command:((check\:check\ status\ of\ service))' \ > 'lsb-commands: : _describe -t lsb-commands "LSB command" sv_lsb_ary' \ > 'sv-commands:sv command:_sv_commands' So when I tested this it made me realize something. The way I had it initially was so that the commands would come first, and then the lsb commands would be listed, and then finally the additional command. I tried passing _alternative -V foo like you can with _describe to preserve order byt I couldn't get that to work. Any ideas? > > This raises an interesting question. I did what you said, but as > > Christian Neukirchen pointed out, on his system the default SVDIR is > > /var/service, and on ubuntu the default is /etc/service. I guess it's > > up to the packager to tweak the script or something? > > I guess it could try to find out what distribution you have by checking > for release files in /etc and choosing a suitable default accordingly. > I'll look into that. [snip] > > Completion/Unix/Command/_sv | 73 +++++++++++++++++++++++++++++++++++++++++++++ > > One thing I forgot to mention is that it should be named _runit: > functions are normally named after the software rather than the command, > e.g. _subversion for svn. > Done. -- fREW Schmidt https://blog.afoolishmanifesto.com