Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: "typeset -x" vs. "export" in 3.1.6
- X-seq: zsh-workers 8389
- From: Alexandre Duret-Lutz <alexandre.duret@xxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: "typeset -x" vs. "export" in 3.1.6
- Date: 24 Oct 1999 13:25:17 +0100
- In-reply-to: "Bart Schaefer"'s message of "Sat, 23 Oct 1999 17:43:11 +0000"
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <991023083509.ZM21037@xxxxxxxxxxxxxxxxxxxxxxx> <991023174311.ZM22277@xxxxxxxxxxxxxxxxxxxxxxx>
- Sender: aduret@xxxxxxxxx
>>> "BS" == Bart Schaefer <schaefer@xxxxxxxxxxxxxxxxxxxxxxx> 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author