Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: zsh-4.2.1: unset does not follow spec



Bart wrote:
> > BTW, the behaviour of unset should, I think, depend on the UNSET option.
> > If UNSET is off, then unset should report an error if the variable is
> > already unset.
> 
> This is actually what I was going to suggest.

Nice try but the unset option (or nounset to be precise) is one of the
options defined in the POSIX specification.

Even if that were not the case, I would disagree. The unset option deals
with variable expansions and I don't see why it would be useful to
overload it with control of this issue. A user's preference on the two
issues wouldn't necessarily correlate.

The specification looks fairly clear to me (zsh is wrong) and I can't
see why anyone would be sufficiently attached to the old behaviour to
want an option for it.

> (Is it time for "emulate posix"?)

Possibly.

How would it differ from "emulate sh"?

Oliver



Messages sorted by: Reverse Date, Date, Thread, Author