From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7131 invoked from network); 28 Jan 2009 04:38:36 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00 autolearn=ham version=3.2.5 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 28 Jan 2009 04:38:36 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 36199 invoked from network); 28 Jan 2009 04:38:30 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 28 Jan 2009 04:38:30 -0000 Received: (qmail 203 invoked by alias); 28 Jan 2009 04:38:24 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 26463 Received: (qmail 192 invoked from network); 28 Jan 2009 04:38:24 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 28 Jan 2009 04:38:24 -0000 Received: from QMTA09.westchester.pa.mail.comcast.net (qmta09.westchester.pa.mail.comcast.net [76.96.62.96]) by bifrost.dotsrc.org (Postfix) with ESMTP id CBC5F80271F0 for ; Wed, 28 Jan 2009 05:38:19 +0100 (CET) Received: from OMTA02.westchester.pa.mail.comcast.net ([76.96.62.19]) by QMTA09.westchester.pa.mail.comcast.net with comcast id 8pBj1b0030QuhwU59seKdg; Wed, 28 Jan 2009 04:38:19 +0000 Received: from smtp.klanderman.net ([98.217.254.247]) by OMTA02.westchester.pa.mail.comcast.net with comcast id 8seK1b0055M2Np63NseK2f; Wed, 28 Jan 2009 04:38:19 +0000 Received: from lwm.klanderman.net (unknown [192.168.100.50]) by smtp.klanderman.net (Postfix) with ESMTP id D99A6B30147 for ; Tue, 27 Jan 2009 23:38:17 -0500 (EST) Received: by lwm.klanderman.net (Postfix, from userid 500) id BDDEC9FC5EF; Tue, 27 Jan 2009 23:38:17 -0500 (EST) From: Greg Klanderman To: zsh-workers@sunsite.dk Subject: Re: PATCH: add zle-line-finish special widget Reply-To: gak@klanderman.net Date: Tue, 27 Jan 2009 23:38:17 -0500 In-Reply-To: <20090123093749.1e6be9fe@news01> (Peter Stephenson's message of "Fri, 23 Jan 2009 09:37:49 +0000") Message-ID: User-Agent: Gnus/5.1007 (Gnus v5.10.7) XEmacs/21.4.17 (linux) References: <18789.30656.261463.382208@gargle.gargle.HOWL> <20090110095231.GA61601@redoubt.spodhuis.org> <20090111025418.GA7272@redoubt.spodhuis.org> <090111110748.ZM12349@torch.brasslantern.com> <090111193317.ZM12655@torch.brasslantern.com> <090117100812.ZM23494@torch.brasslantern.com> <20090123093749.1e6be9fe@news01> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Virus-Scanned: ClamAV 0.92.1/8913/Tue Jan 27 18:40:47 2009 on bifrost X-Virus-Status: Clean --=-=-= Hi Peter and Bart, Here is an updated version of the patch for this feature. thanks for your help on this, Greg --=-=-= Content-Disposition: inline; filename=zsh-finish.patch Index: Doc/Zsh/zle.yo =================================================================== RCS file: /cvsroot/zsh/zsh/Doc/Zsh/zle.yo,v retrieving revision 1.76 diff -u -r1.76 zle.yo --- Doc/Zsh/zle.yo 19 Jan 2009 17:57:43 -0000 1.76 +++ Doc/Zsh/zle.yo 28 Jan 2009 04:26:36 -0000 @@ -871,6 +872,11 @@ (The command inside the function sets the keymap directly; it is equivalent to tt(zle vi-cmd-mode).) ) +tindex(zle-line-finish) +item(tt(zle-line-finish))( +This is similar to tt(zle-line-init) but is executed every time the +line editor has finished reading a line of input. +) tindex(zle-keymap-select) item(tt(zle-keymap-select))( Executed every time the keymap changes, i.e. the special parameter Index: Src/Zle/zle_main.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/Zle/zle_main.c,v retrieving revision 1.121 diff -u -r1.121 zle_main.c --- Src/Zle/zle_main.c 9 Dec 2008 17:37:01 -0000 1.121 +++ Src/Zle/zle_main.c 28 Jan 2009 04:26:36 -0000 @@ -1212,6 +1212,19 @@ zlecore(); + if (done && !exit_pending && !errflag && + (initthingy = rthingy_nocreate("zle-line-finish"))) { + int saverrflag = errflag; + int savretflag = retflag; + char *args[2]; + args[0] = initthingy->nam; + args[1] = NULL; + execzlefunc(initthingy, args, 1); + unrefthingy(initthingy); + errflag = saverrflag; + retflag = savretflag; + } + statusline = NULL; invalidatelist(); trashzle(); --=-=-=--