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

Re: Styles that aren't :completion:* ...



Bart Schaefer wrote:

> ...
> 
> } I considered i-complete-w to be a completion thing. And since in
> } completion it uses `:completion:incremental:...' I thought it would be 
> } easier to understand if it used that for all styles.
> 
> Yes, that's what I'm struggling with here.  One question is, is there any
> way $curcontext could have a value at the time i-c-w or i-a-p are called?

I was thinking about wrapper functions around i-c-w. Not that I really 
expect that there will be such things anytime...

> They'd have to be getting called *inside* the completion or zftp systems,
> wouldn't they?  Which they shouldn't ... so it doesn't make sense to e.g.
> 
>   zstyle ':completion:predict:*:-math-:*' cursor complete
>   zstyle ':completion:predict:*' cursor key
> 
> because insert-and-predict doesn't know that it's in math context.  (On
> the other hand, it might be nice to be able to do that ...)

The old `problem' that most of the context is set up relatively
late... maybe I'll try again to write a utility function that sets up
$curcontext as far as it can sometime.

> But it's still necessary to at least set curcontext=predict::: so that the
> right function field will be present when `zle complete-word' is called.
> 
> } > What's the context?
> } 
> } `:predict', I'd say.
> 
> Then we'll have to remove the i-c-w and predict documentation from the
> completion system sections.  Where should it go instead?

Urgh. Hadn't thought about that. Maybe a `styles.yo' (comparable to
options.yo and params.yo), but where to place it? Next to the options
and parameters would be logically wrong because zstyle is defined by a 
module. Hm.

Bye
 Sven


--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



Messages sorted by: Reverse Date, Date, Thread, Author