zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@sunsite.dk
Subject: Re: PATCH: zsh-4.2.1: unset does not follow spec
Date: Thu, 23 Sep 2004 09:14:41 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.61.0409230843180.23828@toltec.zanshin.com> (raw)
In-Reply-To: <23277.1095931599@trentino.logica.co.uk>

On Thu, 23 Sep 2004, Oliver Kiddle wrote:

> The specification looks fairly clear to me (zsh is wrong)

On Thu, 23 Sep 2004, Geoff Clare wrote:
> 
> I would say that a non-zero exit for "unset" is definitely an error, but 
> the standard is unclear as to whether "unset" is required to treat an 
> attempt to unset a variable that was not previously set as an ordinary 
> error (as opposed to a "utility syntax error", which is definitely not 
> allowed).
> 
> -- 
> Geoff Clare, opengroup.org

I don't really have a strong opinion either way (I can't remember EVER
testing the exit status of "unset" but I suppose it could affect the
shell in the case of "setopt errexit"), but I don't think it's as cut
and dried as it should be.

(Back to Oliver)
On Thu, 23 Sep 2004, Oliver Kiddle wrote:
> 
> > (Is it time for "emulate posix"?)
> 
> Possibly.
> 
> How would it differ from "emulate sh"?

At the moment, it might not.  If, however, we were to discover a case 
where POSIX specifies behavior that differs from historic /bin/sh 
behavior, we might want a plain way to get either one.

Also, although "emulate" has so far been limited to setting options, it 
might be worth considering whether it should also modify the environment, 
e.g., exporting POSIXLY_CORRECT or UNIX95 or whatever.  However, what it 
exported would depend on compile-time configuration, which although it 
could be OS-specific could not be architecture-specific, making trouble
on binary-compatible platforms that use different techniques to achieve
POSIX conformance.  So, I'm not sure.


  reply	other threads:[~2004-09-23 16:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-22 15:04 Sean C. Farley
2004-09-22 15:28 ` Bart Schaefer
2004-09-22 15:37   ` Sean C. Farley
2004-09-22 18:55   ` Matthias B.
2004-09-23  7:54     ` Bart Schaefer
2004-09-23  9:20       ` Peter Stephenson
2004-09-23  9:26       ` Oliver Kiddle
2004-09-23 16:14         ` Bart Schaefer [this message]
2004-09-22 15:44 ` Peter Stephenson

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=Pine.LNX.4.61.0409230843180.23828@toltec.zanshin.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-workers@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).