From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17905 invoked from network); 13 Feb 1999 13:23:16 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 13 Feb 1999 13:23:16 -0000 Received: (qmail 14331 invoked by alias); 13 Feb 1999 13:22:40 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 5362 Received: (qmail 14324 invoked from network); 13 Feb 1999 13:22:38 -0000 Message-Id: <9902131306.AA34056@ibmth.df.unipi.it> To: zsh-workers@sunsite.auc.dk (Zsh hackers list) Subject: PATCH: 3.1.5-pws-7++: #key-* style completions Date: Sat, 13 Feb 1999 14:06:53 +0100 From: Peter Stephenson This alters the format of definitions for directly bindable completions via #key-array or #key-function widgets (for intermittent readers, these function like the old zle -C widgets I previously introduced) so that the bindkey string comes last, and there can be zero or more of them. I've just noticed a slight problem with rebinding all completion-type key bindings to use the new functions, when combined with #key-* bindings: if you do (say) ^D, it will always generate the context-dependent list, replacing the list you just made with the #key-* function, whereas if ^D was bound as originally, it will use an existing completion list. However, that was imperfect because if there was no existing completion list it would generate the one according to the old-style compctl's. So the present arrangement is probably better, but not perfect. Is there some way in shell code of making listing functions use an existing completion list where there is one (maybe as an option)? --- Misc/Completion/__most_recent_file.bk Sat Feb 13 13:48:43 1999 +++ Misc/Completion/__most_recent_file Sat Feb 13 13:49:08 1999 @@ -1,2 +1,2 @@ -#key-array \C-xm expand-or-complete +#key-array expand-or-complete \C-xm __most_recent_file=(-g '*(om[1])') --- Misc/Completion/init.bk Sat Feb 13 13:48:48 1999 +++ Misc/Completion/init Sat Feb 13 13:55:12 1999 @@ -30,17 +30,18 @@ # `#pattern-array ' # like `#pattern-function' but defining an array # -# `#key-function