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

Re: Using the new completion system 'naked'



On Fri, 17 May 2002, DervishD wrote:

>     - Will the old 'compctl' completion system disabled in the
> future? And if the answer is 'yes', when?

The answers are "maybe, but probably not" and "nobody knows."

>     - Can I use the new completion system without compinstall'ing it
> and without compinit'ing it, just by suitably calling compadd,
> compset and compcall (no compdef...)?

Yes, of course you can.  The `compinit' system is only one of many that
could be built on top of the compadd etc. builtins.  It just happens to
be the best one we've come up with so far.

>     Moreover, if the answer is not very large: what advantages gives
> the new completion mechanism over the old one?

Depends on what you mean by "the new completion mechanism."

If you mean "the `compinit' system" then the answer is very large but
mostly boils down to having more completions available out of the box,
with a way to customize them without rewriting them (zstyles), plus a
better-organized system for adding others as we go along.

If you mean the compadd/compset/etc. builtins only, plus `zle -C', then
the advantage is meant to be that the syntax is less baroque than that
of `compctl -x', and correspondingly that more of the processing can be
described by shell functions which are presumably more readable and more
easily debugged than are the cryptic strings used by `compctl'.

One might observe that `_arguments' has become nearly as cryptic as
`compctl', but on the other hand it's also doing a lot more work.



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