guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Complete './pre-inst-env guix ...'


From: Alex Kost
Subject: Re: Complete './pre-inst-env guix ...'
Date: Tue, 16 Jun 2015 20:23:32 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Ludovic Courtès (2015-06-15 23:16 +0300) wrote:

> Alex Kost <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]