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

Re: completion tricks



Felix Rosencrantz wrote:

> Zsh comes with a tool to convert tcsh completions to zsh compctl completions. 
> It might be useful to have a tool to convert zsh compctl completions to the new
> completion system.  Something like this would be useful for converting these
> custom completions.

Yes, I once thought about trying to do that.  It can get pretty
complicated, though (with -T and -t and stuff).  I was just too fed up 
with compctl to mess with it again...

> It could provide a good learning experience for how to use the new system for
> folks familiar with the old (or are able to better understand the old system
> that the new.)

And I'm not sure about this.  Writing a working converter is already
non-trivial, writing one that produces nice code even more so.

> For the timing issues, it might be useful if a completion could be stopped if a
> certain time limit has been reached.  Maybe the check could occur between
> completers.  So in addition to check if there were any matches, it could see if
> the time limit was exceeded.

Hm, if seconds are accurate enough this would be extremely simple to
add using $SECONDS.

>  Also, I thought there was a style to tell the completion system, if a given
> filepath exists, accept it without trying to do completions on the whole
> path...  Something like that might help prevent NFS from being excessively
> tickled by completion.

It's the default behaviour: leading path segments are accepted as they 
are if there are files below them that can be matched by the rest of
the partially given path.


Bye
 Sven


--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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