Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Count of last matches (was: RE: Reading completion manual)
- X-seq: zsh-workers 5627
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: "Andrej Borsenkow" <borsenkow.msk@xxxxxx>
- Subject: Re: Count of last matches (was: RE: Reading completion manual)
- Date: Wed, 3 Mar 1999 08:02:16 -0800 (PST)
- Cc: "ZSH workers mailing list" <zsh-workers@xxxxxxxxxxxxxx>
- In-reply-to: <000a01be6554$f8102b20$21c9ca95@xxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <000a01be6554$f8102b20$21c9ca95@xxxxxxxxxxxxxxx>
- Reply-to: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
Andrej Borsenkow writes:
>
> > Applied to all three: what about some return code to indicate, if
> > some matches were added? Currently one has to save, and then
> > compare, compstate[nmatches], that looks somewhat ugly. Using
> > return code would provide for
> >
> > compgen -k friends || compgen -u
>
> 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 might be useful, but I think the most useful bit of information is
whether anything at all was added (or whether the calling function
should behave as if anything at all was added, which may be a different
thing).
So even if a last_nmatches key were added to compstate, I'd still be in
favor of a useful return value from compgen et al.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author