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

Re: zsh-3.1.5-pws-5: mixing "old" and "new" completions?



Sven Wischnowsky wrote:
> > I would like to start play with new completion stuff. But I do not want to
> > completely lose all current compctl's I have.
> 
> No, currently I'm not sure how to do this.

I wondered about this, too, and while I'm spending most of my time
replying to zsh-workers mail...

I haven't got around to considering the new completion in detail, but
it did occur to me it could be better integrated with the widget
completion I added, i.e. zle -c and zle -C could be made more similar.
Then you should be able to use arbitrary old-style compctls from any
zle function.  One way of doing this is using compctl -L to get the
old definition, dumping that straight into a widget with zle -C, and
calling that --- I think that can even be done now with a bit of sed
or equivalent, although -C doesn't handle different completion
functions as well as -c does, which is the main user-visible change
I'd like to make.

However, it might be better to allow a modified zle -C which copies
the widget from an existing compctl --- maybe it should even call it
straight away and delete it, i.e. then you get what Andrej is asking
for in one go.  Internally, I don't think that's too hard.

-- 
Peter Stephenson <pws@xxxxxxxxxxxxxxxxx>       Tel: +39 050 844536
WWW:  http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy



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