From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7011 invoked from network); 16 Jun 1999 16:43:58 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 16 Jun 1999 16:43:58 -0000 Received: (qmail 10402 invoked by alias); 16 Jun 1999 16:43:49 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6679 Received: (qmail 10395 invoked from network); 16 Jun 1999 16:43:46 -0000 Message-Id: <9906161614.AA17674@ibmth.df.unipi.it> To: "Zsh hackers list" Subject: PATCH: pws-22: zle -C after rebinding completion widgets In-Reply-To: "Peter Stephenson"'s message of "Wed, 16 Jun 1999 17:42:42 DFT." <9906161542.AA12356@ibmth.df.unipi.it> Date: Wed, 16 Jun 1999 18:14:40 +0200 From: Peter Stephenson Peter Stephenson wrote: > "Andrej Borsenkow" wrote: > > Since I've never seen any reply to this, I repeat it here. > > > > My suggestion was, that instead of rebinding keys (as is done currently) we > > should simply redefine corresponding widgets. > > This certainly looks like a good idea. One tweak might be nice first: if a completion widget, for example complete-word, is rebound, then `zle -C ... complete-word ...' doesn't work; you need .complete-word. There's no reason in this case why we shouldn't use the immortal version with the `.' in front all the time, since the intention is unambiguous. --- Doc/Zsh/compwid.yo.dot Mon Jun 14 09:12:38 1999 +++ Doc/Zsh/compwid.yo Wed Jun 16 18:07:45 1999 @@ -26,7 +26,8 @@ tt(complete-word), tt(expand-or-complete), tt(expand-or-complete-prefix), tt(menu-complete), tt(menu-expand-or-complete), tt(reverse-menu-complete), -tt(list-choices), or tt(delete-char-or-list). +tt(list-choices), or tt(delete-char-or-list). Note that this will still +work even if the widget in question has been rebound. startmenu() menu(Special Parameters) --- Src/Zle/zle_thingy.c.dot Mon Jun 14 16:46:53 1999 +++ Src/Zle/zle_thingy.c Wed Jun 16 18:06:12 1999 @@ -490,7 +490,8 @@ return 1; } #endif - t = rthingy(args[1]); + + t = rthingy((args[1][0] == '.') ? args[1] : dyncat(".", args[1])); cw = t->widget; unrefthingy(t); if (!cw || !(cw->flags & ZLE_ISCOMP)) { -- Peter Stephenson Tel: +39 050 844536 WWW: http://www.ifh.de/~pws/ Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy