Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: starting completions with =,<,>
- X-seq: zsh-workers 20194
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: starting completions with =,<,>
- Date: Sun, 25 Jul 2004 10:42:38 -0700 (PDT)
- In-reply-to: <pan.2004.07.25.11.42.39.666502@xxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <pan.2004.07.25.11.42.39.666502@xxxxxxxxx>
- Reply-to: zsh-workers@xxxxxxxxxx
On Sun, 25 Jul 2004, chris s wrote:
> Hi, I'm trying to add to the functionality of the emerge completion for
> gentoo linux. For example,
>
> emerge -p =zsh-4.2.0-r1
Unless you "unsetopt equals" this could potentially be expanded into
emerge -p /usr/local/bin/zsh-4.2.0-r1
(or the like). That's why there's the "-equals-" completion context.
> I saw in the manpage that _values does not support the equal sign.
Can you quote the bits of the manual that made you think this?
In any event I don't think you want _values. The _values function is for
words of the form <name><sep><value> where <sep> defaults to "=", e.g.
"foo=bar" (like an assignment). You can tell it to use a different <sep>,
but in the case of emerge there doesn't appear to be a <name> part.
> '--exact[specify exact version]:*::alt:->exact_ver'
>
> This is what I'd rather have look like this:
>
> '=[specify exact version]:*::alt:->exact_ver'
The problem here is that you're trying to treat this as an option, when
what you need to do is treat it as an argument. The question is whether
it is a stand-alone argument, or whether it's an argument that must follow
the -p option? I haven't been able to dig up any documentation on emerge
(the only software I can find are a mass-mailing program and the emacs CVS
interface -- everything else is lost in the Google noise because "emerge"
is a real word).
Messages sorted by:
Reverse Date,
Date,
Thread,
Author