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

Re: PATCH: 3.1.5-pws-8: using pattern completions



Sven Wischnowsky wrote:
> - Due to getting the patterns automatically from the files they are
>   not sorted. This may be an argument in favor of the simplified
>   processing I used in the `Comp' example directory.

But isn't that simply because there's now no way to handle patterns?  That
doesn't seem to me an advantage.

I don't like Functions/Comp as it stands, because there's no way of
automatically defining the relationship between a $COMMAND and a
__function, so I haven't tested it out properly.  I very much prefer a
modular system, which can handle one file per command (or even per suite of
commands), otherwise it makes altering the system and tracking what's going
on just too difficult.  This is for me one of the major advantages of the
new completion system: a single file can replace a ragbag of
initialisations and functions.  I'm quite happy with having some notion of
context built in alongside this.  We already have things a bit like that
with helpers like __files providing common completions for particular
contexts.

> - We probably should also completely remove the completion-array-handling.
>   This would make the code much cleaner, would allow us to get rid of
>   the callcomplete-trampoline, and would allow us to call dump anytime.

Yes, I was wondering about this.  Having a lot of autoloaded functions just
call complist isn't so much worse than than having all the baggage for
handling variables, and this time the simplification would certainly make
the interface no less powerful.  Also, we keep particular completions
within the functions namespace and avoid the variables namespace except for
special usage.  So I'm in favour.  I'll put the new version (which has now
arrived) in pws-9.  The directory will still be Functions/Completion .

-- 
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