Ludovic Courtès (2015-06-15 23:16 +0300) wrote: > Alex Kost <alez...@gmail.com> skribis: > >> So (analogously to 'pcomplete/sudo') the following function may be used >> to complete "pre-inst-env" properly: >> >> (defun pcomplete/pre-inst-env () >> (pcmpl-args-pcomplete >> (pcmpl-args-make-argspecs >> `((argument 0 (("COMMAND" nil)) >> :subparser pcmpl-args-command-subparser))))) > > Indeed, that works like a charm, thanks! > > Now, the fact that ‘pre-inst-env’ is not mentioned in this function is > puzzling. It doesn’t take the function name into account, does it?
Yes, that's how 'pcomplete' works. To make a completion for some "foo" command, you define 'pcomplete/foo' function and that's all. -- Alex