Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: $curcontext in _subscript



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