From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1792 invoked from network); 5 Nov 1998 18:36:18 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 5 Nov 1998 18:36:18 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id NAA03172; Thu, 5 Nov 1998 13:35:11 -0500 (EST) Resent-Date: Thu, 5 Nov 1998 13:35:11 -0500 (EST) From: "Bart Schaefer" Message-Id: <981105103236.ZM29230@candle.brasslantern.com> Date: Thu, 5 Nov 1998 10:32:36 -0800 In-Reply-To: <13889.58788.469493.330819@catbus.alphatech.com> Comments: In reply to greg@alphatech.com (Greg Klanderman) "quick question about user defined zle widgets" (Nov 5, 12:51pm) References: <13889.58788.469493.330819@catbus.alphatech.com> X-Mailer: Z-Mail (4.0b.820 20aug96) To: greg@alphatech.com, zsh-workers@math.gatech.edu (Zsh list) Subject: Re: quick question about user defined zle widgets MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-Message-ID: <"nHQ862.0.Sn.V_UGs"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/4568 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu On Nov 5, 12:51pm, Greg Klanderman wrote: } Subject: quick question about user defined zle widgets } } Is it possible when defining a shell function as a user defined } widget to access the prefix argument? I posted a patch to pass the prefix argument as a positional parameter, but Zefram objects to using the positional parameters of widget functions and so didn't include it in the release. There are also several bugs (all of which I reported, search the archive) involving widget functions that invoke others via the "zle" command, one of which causes the prefix arg to get bizarre (usually very large) values. } Also, is there any way when calling a builtin widget to figure out } the status? For example, I'd like to do "zle complete-word" in my } widget and then determine if: } } - it completed something } - there were no completions } - choices were listed } - choices had already been listed and it did nothing I believe my patch also arranges to return a sensible exit code from the "zle" command based on the return of the widget that is called, but I don't recall for certain and I think Zefram objected to this as well. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com