From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27968 invoked from network); 25 Apr 2006 03:06:36 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO autolearn=ham version=3.1.1 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 25 Apr 2006 03:06:36 -0000 Received: (qmail 36125 invoked from network); 25 Apr 2006 03:06:30 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 25 Apr 2006 03:06:30 -0000 Received: (qmail 6091 invoked by alias); 25 Apr 2006 03:06:22 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10180 Received: (qmail 6081 invoked from network); 25 Apr 2006 03:06:21 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 25 Apr 2006 03:06:21 -0000 Received: (qmail 34952 invoked from network); 25 Apr 2006 03:06:21 -0000 Received: from vms042pub.verizon.net (206.46.252.42) by a.mx.sunsite.dk with SMTP; 25 Apr 2006 03:06:19 -0000 Received: from torch.brasslantern.com ([71.116.76.26]) by vms042.mailsrvcs.net (Sun Java System Messaging Server 6.2-4.02 (built Sep 9 2005)) with ESMTPA id <0IY900KS3CMGFO16@vms042.mailsrvcs.net> for zsh-users@sunsite.dk; Mon, 24 Apr 2006 22:06:17 -0500 (CDT) Received: from torch.brasslantern.com (localhost.localdomain [127.0.0.1]) by torch.brasslantern.com (8.13.1/8.13.1) with ESMTP id k3P36Cf0000998 for ; Mon, 24 Apr 2006 20:06:16 -0700 Received: (from schaefer@localhost) by torch.brasslantern.com (8.13.1/8.13.1/Submit) id k3P36BBA000997 for zsh-users@sunsite.dk; Mon, 24 Apr 2006 20:06:11 -0700 Date: Mon, 24 Apr 2006 20:06:11 -0700 From: Bart Schaefer Subject: Re: Problem with motion commands defined using match-word-by-style used with vi-delete In-reply-to: To: zsh-users@sunsite.dk Message-id: <060424200611.ZM996@torch.brasslantern.com> MIME-version: 1.0 X-Mailer: OpenZMail Classic (0.9.2 24April2005) Content-type: text/plain; charset=us-ascii References: <060423085310.ZM31491@torch.brasslantern.com> <200604232308.k3NN8Wtj004945@pwslaptop.csr.com> Comments: In reply to "Nikolai Weibull" "Re: Problem with motion commands defined using match-word-by-style used with vi-delete" (Apr 24, 9:39pm) On Apr 24, 9:39pm, Nikolai Weibull wrote: } Subject: Re: Problem with motion commands defined using match-word-by-styl } } On 4/24/06, Peter Stephenson wrote: } > } > Here's a simple internal widget that reads a key sequence and sets } > REPLY to the command bound to it (so you can run zle on that). [Hmm, somehow I managed to miss PWS's message. I wonder if it was a victim of Verizon's latest overeager spam-blocking fiasco.] This is actually quite useful as it resets KEYS as well as sets REPLY, so with this you can do describe-key-briefly() { zle -R "Describe key briefly: " zle read-command zle -M "${(V)KEYS} is $REPLY" } That doesn't help with describe-binding, which needs to map in the other direction, but it's a start. Incidentally I just noticed that within a widget called by using execute-named-command, the value of $KEYS is carriage return. I'm not sure what I expected it to be, but that wasn't it. } There's still no easy way to execute the command in the right } environment so that WIDGET is set to the read command that we want to } execute. It really *should* be the case that local -h WIDGET creates a new parameter named WIDGET that is neither read-only nor special, but apparently the usual parameter rules don't apply to the ZLE specials.