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

Re: Count of last matches (was: RE: Reading completion manual)



Andrej Borsenkow wrote:

> What about following: add new item to compstate, say, last_nmatches, that
> hold count of matches added by the *last* used compgen, compadd, compcall.
> That can be used to test if we got something, and probably may be useful for
> other tasks as well. And definitely better
> 
> if [[ $compstate[last_nmatches] -gt 0 ]]

Easy to add. Some more feedback?

> than current
> 
> save nmatches
> call completion
> compare

You don't like shell code, do you? ;-)

Bye
 Sven


--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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