Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: $curcontext in _subscript
- X-seq: zsh-workers 9820
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: $curcontext in _subscript
- Date: Mon, 21 Feb 2000 14:12:06 +0100 (MET)
- In-reply-to: Oliver Kiddle's message of Mon, 21 Feb 2000 13:04:02 +0000
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
Oliver Kiddle wrote:
> In my .zshrc, I have zstyle to define a tag-order of 'indexes parameters' for -subscript- because I don't want it to complete all variables after something like '$path['. This stopped working a while ago.
I hope you really mean `indexes' and -- in a separate word --
`parameters'. Otherwise this would mean they should both be tried
immediatly and together...
> It seems that when _subscript is run, $curcontext is ':complete:-subscript-'. Why is 'completion' not in there as the first bit. As far as I can tell, 'complete' is put there by the complete completer.
Because its given in the calls to zstyle.
> What exactly should I be using as the parameters to zstyle to achieve this: it works with '*-subscript-*' but I'd prefer to use something more specific.
Always remember that now the context names simply and cleanly always
have the fixed format: `:completion:<function>:<completer>:<command>:<arg>:<tag>'.
Where <command> may also be one of the special contexts. So, what you
want is:
zstyle ':completion:*:*:-subscript-:*' tag-order indexes parameters
Bye
Sven
P.S.: But just being able to define such things is fun, isn't it?
--
Sven Wischnowsky wischnow@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author