From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1917 invoked from network); 29 May 2001 20:43:29 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 29 May 2001 20:43:29 -0000 Received: (qmail 17559 invoked by alias); 29 May 2001 18:43:57 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 3906 Received: (qmail 17492 invoked from network); 29 May 2001 18:43:50 -0000 To: zsh-users@sunsite.dk Subject: Re: compctl -y problem. Message-Id: From: Cesar Crusius Date: Tue, 29 May 2001 08:41:16 -0700 In reply to "Bart Schaefer" > >(Part of this thread went to zsh-workers ... returning now to zsh-users >with a workaround) > >On May 25, 3:11pm, Bart Schaefer wrote: >} >} I know Sven won't be thrilled about being asked to fix anything in the >} old compctl code ... perhaps we should just remove the `-y' option, as >} it's new since 3.0 anyway, and document the correct way to achieve the >} same effect by using the new completion system (which, incidentally, I >} don't know how to do ... `compadd -d' doesn't quite cut it). > >I don't know what the output of `aereport changes` looks like, so it may >be that there's a simpler solution. For example, if the same number of >lines will be returned by `aereport changes -unf` and `... -terse`, this >will work: > >function _aecd { > local change_descriptions reply > change_descriptions=(${(f)"$(aereport changes -unf | grep -v completed)"}) > reply=($(aereport changes -terse | grep -v completed | sed -e 's/ .*$//')) > compadd -ld change_descriptions -a reply > compstate[list]='list force' >} This one works perfectly. Thanks! -- Cesar Augusto Rorato Crusius o _ _ _ Stanford University __o /\_ _ \\o (_)\__/o (_) e-mail:crusius@barcelonadesign.com _`\<, _>(_) (_)/<_ \_| \ _|/' \/ www.stanford.edu/~crusius (_)/(_) (_) (_) (_) (_)' _\o_ He who sacrifices functionality for ease of use Loses both and deserves neither