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

Re: PATCH: first go at directory info in completion.



Mikael Magnusson wrote:
> I imagine you could make it use (an array of?) function hooks that
> you can define yourself, like is done for precmd and friends. In the
> meantime I made a quick hack to use xattrs via the z*attr commands I
> added a while back.

Generic functions for directory information shouldn't be a big deal.
They can then use any available caching mechanism they feel like.

> I also noticed that when in this long list format, all coloring from
> file types and etc is lost, is there any way to have both? (without
> doing the fabled rewrite).

I think it will have to split the arguments to "compadd" into two,
passing the dirinfo parts with the -J or -V replaced appropriately.  To
do this with a minimum of duplication it would probably be best to make
_list_files responsible for running compadd by passing the compadd
arguments down.  It can then run it twice when necessary.

(This is the sort of addition rewriting won't help you with unless you
explicitly make sure it does, which is why I'm suspicious of the idea of
a rewrite as some kind of panacea for everything.  It would make it more
maintainable, but that's basically all.)

-- 
Peter Stephenson <pws@xxxxxxx>            Software Engineer
Tel: +44 (0)1223 692070                   Cambridge Silicon Radio Limited
Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, UK


'member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom'



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