From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17313 invoked from network); 29 Sep 1999 16:40:53 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 29 Sep 1999 16:40:53 -0000 Received: (qmail 702 invoked by alias); 29 Sep 1999 16:40:41 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8099 Received: (qmail 695 invoked from network); 29 Sep 1999 16:40:40 -0000 Date: Wed, 29 Sep 1999 17:40:40 +0100 From: Adam Spiers To: Zsh hackers list Subject: Re: PATCH: 3.1.6-pws-6: compdef -K Message-ID: <19990929174040.A14436@thelonious.new.ox.ac.uk> Reply-To: Adam Spiers Mail-Followup-To: Zsh hackers list References: <9909291537.AA22206@ibmth.df.unipi.it> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre2i In-Reply-To: <9909291537.AA22206@ibmth.df.unipi.it> X-URL: http://www.new.ox.ac.uk/~adam/ X-OS: Linux 2.2.9 i686 Peter Stephenson (pws@ibmth.df.unipi.it) wrote: > This implements compdef -K, which is like compdef -k but you can define > multiple widgets to use the same function. One use of this is to create > completion and listing widgets simultaneously, but I've used it to make > _history_complete_word work better: it now defines two widgets, > _history-complete-older and _history-complete-newer, which it can use to > decide which way it's going. Nice; thanks Peter. I'm a bit snowed under at the moment, but I will fix _history_complete_word ASAP (I hadn't twigged that you need to deal with when compstate[insert] is set to something other than a number). > for some other reason even > with history_stop set it won't stop cycling through them. Does it stop in one direction only, or neither? If only one, it's because of compstate[nmatches] returning all matches before duplicate removal. If neither, my code is even worse than I thought, which wouldn't surprise me much :-)