From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22430 invoked from network); 13 Jan 1999 12:04:28 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 13 Jan 1999 12:04:28 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id HAA00195; Wed, 13 Jan 1999 07:02:21 -0500 (EST) Resent-Date: Wed, 13 Jan 1999 07:02:21 -0500 (EST) Message-ID: <19990113120153.A7542@fysh.org> Date: Wed, 13 Jan 1999 12:01:53 +0000 From: Phil Pennock To: zsh-workers@math.gatech.edu Subject: Re: How sensible is ... ? Mail-Followup-To: zsh-workers@math.gatech.edu References: <19990113110951.A6955@fysh.org> <9901131117.AA60050@ibmth.df.unipi.it> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.91.2 In-Reply-To: <9901131117.AA60050@ibmth.df.unipi.it>; from "Peter Stephenson" on Wed 13 Jan 1999 (12:17 +0100) Organisation: Organisation? Here? No, over there ----> X-Disclaimer: Any views expressed in this message, where not explicitly attributed otherwise, are mine and mine alone. Such views do not necessarily coincide with those of any organisation or company with which I am or have been affiliated. Resent-Message-ID: <"4fdJW3.0.-2.Dj8ds"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/4897 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Typing away merrily, Peter Stephenson produced the immortal words: > > Is this a sufficient test? It /seems/ to work as I want ... > > In this particular case, you don't need it, since return will function > like exit in a script. *doh* > foo=global > local foo >/dev/null > if [[ $foo = global ]]; then > print At top level > else > print Inside a function > fi I found that using 'alias' inside there failed to work (in an autoloaded function anyway) and had to convert to a function. And useing 'typeset -f leavecmd' then defining it after a possible 'setopt localfunctions', it remained in scope. I'm at work and decided against spending more time on that so just used TRAPEXIT to unfunction it -- maybe I'm just doing something wrong ... All this just for a really nice version of xtitle ... -- --> Phil Pennock ; GAT d- s+:+ a23 C++(++++) UL++++/I+++/S+++/H+ P++@ L+++ E-@ W(+) N>++ o !K w--- O>+ M V !PS PE Y+ PGP+ t-- 5++ X+ R !tv b++>+++ DI+ D+ G+ e+ h* r y?