From: Alex Kost <alezost@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel@gnu.org
Subject: Re: Complete './pre-inst-env guix ...'
Date: Tue, 16 Jun 2015 20:23:32 +0300 [thread overview]
Message-ID: <87a8vzy3cb.fsf@gmail.com> (raw)
In-Reply-To: <87ioao7mnr.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Mon, 15 Jun 2015 22:16:08 +0200")
Ludovic Courtès (2015-06-15 23:16 +0300) wrote:
> Alex Kost <alezost@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
prev parent reply other threads:[~2015-06-16 17:23 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-06 20:44 [PATCH 2/2] emacs: Add shell completions for "guix" command Alex Kost
2015-06-07 15:36 ` Ludovic Courtès
2015-06-07 19:38 ` Ludovic Courtès
2015-06-08 8:52 ` Alex Kost
2015-06-08 19:19 ` Ludovic Courtès
2015-06-10 7:31 ` Complete './pre-inst-env guix ...' Alex Kost
2015-06-10 19:44 ` Ludovic Courtès
2015-06-11 14:41 ` Alex Kost
2015-06-14 22:07 ` Ludovic Courtès
2015-06-15 12:43 ` Alex Kost
2015-06-15 20:16 ` Ludovic Courtès
2015-06-16 17:23 ` Alex Kost [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87a8vzy3cb.fsf@gmail.com \
--to=alezost@gmail.com \
--cc=guix-devel@gnu.org \
--cc=ludo@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.