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

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



On May 16,  9:58am, Sven Wischnowsky wrote:
} Subject: Re: Styles that aren't :completion:* ...
}
} Bart Schaefer wrote:
} 
} > I notice that the nslookup function uses a context of ':nslookup', whereas
} > assorted zftp components use ":zftp$curcontext".
} 
} Yes, but it's not the completion-$curcontext, it's the zftp-one.

Ah.

} 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?
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 ...)

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?

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com



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