From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15584 invoked from network); 16 Dec 1998 09:57:55 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 16 Dec 1998 09:57:55 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id EAA03923; Wed, 16 Dec 1998 04:52:15 -0500 (EST) Resent-Date: Wed, 16 Dec 1998 04:52:15 -0500 (EST) From: "Bart Schaefer" Message-Id: <981216015048.ZM11424@candle.brasslantern.com> Date: Wed, 16 Dec 1998 01:50:48 -0800 In-Reply-To: <199812160805.JAA00604@beta.informatik.hu-berlin.de> Comments: In reply to Sven Wischnowsky "Re: wrapper functions in modules" (Dec 16, 9:05am) References: <199812160805.JAA00604@beta.informatik.hu-berlin.de> X-Mailer: Z-Mail (4.0b.820 20aug96) To: Sven Wischnowsky , zsh-workers@math.gatech.edu Subject: Re: wrapper functions in modules MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-Message-ID: <"X1nka3.0.Bz.EBuTs"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/4818 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu On Dec 16, 9:05am, Sven Wischnowsky wrote: } Subject: Re: wrapper functions in modules } } Bart Schaefer wrote: } } > On Dec 15, 1:03pm, Sven Wischnowsky wrote: } > } } > } Bart Schaefer wrote: } > } > Is the new first parameter of doshfunc() needed any longer? } > } } > } [For those who don't want to look at the code: the argument is the } > } name of the function to be executed.] } > } } > } I added the argument since modules may be interested in it } > } > Hm. I'm not sure that modules *ought* to be interested in it, but... } } I wouldn't resist to remove this or to use a global variable for it. A parameter is almost always better than a global, for things that get stacked and restored like this. } > One thing a wrapper function might legitimately be interested in is the } > context in which it was called. } } Yes, that would be good to have. Using a global integer variable or an } argument and a couple of constants? Here a global makes more sense, since it only changes once as you enter (say) the completion code and remains constant all the way down the shell function call chain. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com