From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10244 invoked from network); 24 Oct 1999 10:26:27 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 24 Oct 1999 10:26:27 -0000 Received: (qmail 22076 invoked by alias); 24 Oct 1999 10:26:19 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8389 Received: (qmail 22063 invoked from network); 24 Oct 1999 10:26:18 -0000 Sender: aduret@venus.l2i To: zsh-workers@sunsite.auc.dk Subject: Re: "typeset -x" vs. "export" in 3.1.6 References: <991023083509.ZM21037@candle.brasslantern.com> <991023174311.ZM22277@candle.brasslantern.com> X-Attribution: plx From: Alexandre Duret-Lutz Date: 24 Oct 1999 13:25:17 +0100 In-Reply-To: "Bart Schaefer"'s message of "Sat, 23 Oct 1999 17:43:11 +0000" Message-ID: <7du2nh54k2.fsf@venus.l2i> User-Agent: Gnus/5.0700000000000003 (Pterodactyl Gnus v0.97) Emacs/20.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii >>> "BS" == Bart Schaefer writes: [...] BS> There doesn't seem to have ever been doc written for "typeset -g". I have just read a paragraph about it in zshbuiltins.1 ! [...] BS> "typeset -x" meant "marks global and puts in the environment, iff BS> not marked local" which seems to have mutated into "puts in the BS> environment, iff marked global". This has the effect of BS> rendering -x a no-op anywhere except at the top level, which I'm BS> pretty sure is incompatible with ksh. [...] BS> Can someone who has a real ksh available please confirm BS> what the precise ksh behavior is? Does it differ in 88/93?) ~ % echo $ZSH_VERSION 3.1.6-bart-7 ~ % emulate ksh ~ % foo() { typeset -x bar=123; sh -c 'echo $bar' } ~ % foo ~ % emulate zsh; strings =ksh | grep -i version @(#)Version M-11/16/88i ~ % ksh venus:281> foo() { typeset -x bar=123; sh -c 'echo $bar'; } venus:282> foo # note: ^--- is needed 123 venus:283> So having 'typeset -x' doing 'typeset -xg' seems to be right for ksh emulation. [...] -- Alexandre 'Pollux' Duret-Lutz