From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17124 invoked from network); 29 Sep 1999 16:12:59 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 29 Sep 1999 16:12:59 -0000 Received: (qmail 28705 invoked by alias); 29 Sep 1999 16:12:53 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8098 Received: (qmail 28698 invoked from network); 29 Sep 1999 16:12:52 -0000 Message-Id: <9909291537.AA22206@ibmth.df.unipi.it> To: zsh-workers@sunsite.auc.dk (Zsh hackers list) Subject: PATCH: 3.1.6-pws-6: compdef -K Date: Wed, 29 Sep 1999 17:37:21 +0200 From: Peter Stephenson 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. I haven't altered _history_complete_word otherwise, because I don't know what Adam's doing with it, but for some reason it's stopped working with menu completion again, because zsh insists on saying it's using automenu when it's using ordinary menu completion, and for some other reason even with history_stop set it won't stop cycling through them. --- Completion/Commands/w2_history_complete_word Wed Sep 29 16:38:55 1999 +++ Completion/Commands/_history_complete_word Wed Sep 29 16:54:15 1999 @@ -1,4 +1,4 @@ -#compdef -k complete-word \e/ \e, +#compdef -K _history-complete-older complete-word \e/ _history-complete-newer complete-word \e, # # Complete words from the history # @@ -20,19 +20,11 @@ local expl direction - case "$KEYS" in - ',') direction='newer' - ;; - '/') direction='older' - ;; - *) print <