From: Chris Jepeway <jepeway@blasted-heath.com>
To: chet@po.CWRU.Edu
Cc: zsh-users@sunsite.dk, pws@csr.com
Subject: Re: ksh Emulation Not Clearing Envariables
Date: Tue, 11 May 2004 16:38:09 -0400 [thread overview]
Message-ID: <1D23F586-A38B-11D8-B3B9-000A95B34D8E@blasted-heath.com> (raw)
In-Reply-To: <040511192759.AA02456.SM@caleb.ins.cwru.edu>
>>> Variable assignments specified with special built-in utilities
>>> remain
>>> in effect after the built-in completes; this shall not be the case
>>> with a regular built-in or other utility.
>>
>> Well...the variable assignment isn't occurring inside the function.
>> It's outside, put into the environment before the function is called.
>
> Did you actually read the spec?
Nope. I read the excerpts you provided, in the belief that
you meant them to clearly support your statements. Shoot me
for not catching that "[v]ariable assignments specified with
special built-in utilities" meant "variable assignments
preceding the command name."
> Maybe reading the `Simple Commands' section will convince you:
>
> If no command name results, variable assignments shall affect the
> current execution environment. Otherwise, the variable assignments
> shall be exported for the execution environment of the command and
> shall not affect the current execution environment (except for special
> built-ins).
Yup, sure, that's pretty definitive. What does it mean for
X=one unset X
Nothing, I suppose. unset will unset. Never in a million years
would I have expected after
X=one :
for X to persist, while after
X=one true
X is unset.
I wonder what the original purpose was, here. A "get out of jail
free card" that let code implementing the special built-ins slide?
These things (err, the SBIs) all look commands that *must* be
implemented
as built-ins, so perhaps in some implementation(s) there weren't the
hooks
to unset vars after they completed. POSIX just codified it so
pre-existing
implementations could remain compliant?
>>> Chet Ramey, ITS, CWRU chet@po.cwru.edu
>>> http://tiswww.tis.cwru.edu/~chet/
>> Me
> Chet Ramey, ITS, CWRU chet@po.cwru.edu
> http://tiswww.tis.cwru.edu/~chet/
Chris <jepeway@blasted-heath.com>.
prev parent reply other threads:[~2004-05-11 20:39 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-09 0:41 Chris Jepeway
2004-05-09 21:58 ` Bart Schaefer
2004-05-10 14:52 ` Peter Stephenson
2004-05-11 17:03 ` Chris Jepeway
2004-05-11 16:59 ` Chris Jepeway
2004-05-11 17:34 ` Peter Stephenson
[not found] ` <040511181944.AA29985.SM@caleb.ins.cwru.edu>
2004-05-11 18:44 ` Chris Jepeway
2004-05-11 20:22 ` Bart Schaefer
[not found] ` <040511192759.AA02456.SM@caleb.ins.cwru.edu>
2004-05-11 20:38 ` Chris Jepeway [this message]
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=1D23F586-A38B-11D8-B3B9-000A95B34D8E@blasted-heath.com \
--to=jepeway@blasted-heath.com \
--cc=chet@po.CWRU.Edu \
--cc=pws@csr.com \
--cc=zsh-users@sunsite.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).