Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Update _virsh completion
- X-seq: zsh-workers 39151
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- Subject: Re: Update _virsh completion
- Date: Thu, 1 Sep 2016 16:01:35 +0000
- Cc: zsh workers <zsh-workers@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=yB/yWab9WOHvZqg1crYLIJ5DF7o=; b=JkEpvd NzyfR87D8oaKrMicNQLwR3q6ttHFfyQiP4LAGDvH7jYUzbkStANSAW4yO7ToVVI3 iOCtnh6J+dJUXc8hodCdRUGguuNy2aN7GjbdQe1zflopUQ+iCqpIuh6oSJ8VDnb4 BLP5IouBOgU3reoK6jvklq0F9VhdtDFGHChpE=
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=yB/yWab9WOHvZqg1crYLIJ5DF7o=; b=q1shR rsG4Y0Kiizmriarrw/iIfxkwE5cf808iDXvD+3FIAPMNiziI0gDA5Dhoe4LZE1Dm RCQ6lBWrIvwEC6YRlzKXc7Bpj/CDKk3SgmzpQWHf0UyW6gLbvO4brLd2IWSIM14p TcWetJiZHhlkaTyrc5NBlX10Vl+VQJtGffnH5o=
- In-reply-to: <14008.1472679881@hydra.kiddle.eu>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <f957d4aa-d989-6252-14d2-0cc57afdab68@redhat.com> <20160831174915.GA11043@fujitsu.shahaf.local2> <14008.1472679881@hydra.kiddle.eu>
Oliver Kiddle wrote on Wed, Aug 31, 2016 at 23:44:41 +0200:
> Daniel Shahaf wrote:
> > Marko Myllynen wrote on Mon, Aug 29, 2016 at 11:03:13 +0300:
> > > $ virsh start --domain foo --autodestroy <TAB>
> > > --autodestroy --console --pass-fds
> >
> > That's because the expansion contains "--autodestroy" twice. You can
> > easily uniquify the expansion with ${(u)foo} (or 'typeset -aU').
>
> I think it is caused by the presence of the word foo on the
> line which is not one of the values passed to _values.
I can't reproduce the problem you're describing here.
I can reproduce the problem I described in my previous reply:
$ zsh -f
% autoload compinit; compinit
% _f() _values -w desc foo bar baz foo
% compdef _f f
% f foo bar <TAB>
baz foo
> The description describes what should be entered (e.g. a server) not
> what the listed matches are (e.g. servers).
To clarify: the description tells the user how the shown values would be
used. This is easiest to explain in terms of commands that takes
multiple arguments of the same type, like 'mv foo.txt bar.txt' might use
the descriptions "source file" and "target file".
(The example ignores some other syntaxes of mv(1) for simplicity.)
Cheers,
Daniel
Messages sorted by:
Reverse Date,
Date,
Thread,
Author