zsh-workers
 help / color / mirror / code / Atom feed
From: Alexandre Duret-Lutz <alexandre.duret@greyc.ismra.fr>
To: zsh-workers@sunsite.auc.dk
Subject: Re: "typeset -x" vs. "export" in 3.1.6
Date: 24 Oct 1999 13:25:17 +0100	[thread overview]
Message-ID: <7du2nh54k2.fsf@venus.l2i> (raw)
In-Reply-To: "Bart Schaefer"'s message of "Sat, 23 Oct 1999 17:43:11 +0000"

>>> "BS" == Bart Schaefer <schaefer@candle.brasslantern.com> 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



  reply	other threads:[~1999-10-24 10:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-10-23  8:35 Bart Schaefer
1999-10-23 17:43 ` Bart Schaefer
1999-10-24 12:25   ` Alexandre Duret-Lutz [this message]
1999-10-24 16:09     ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7du2nh54k2.fsf@venus.l2i \
    --to=alexandre.duret@greyc.ismra.fr \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).