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

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



On Wed, 22 Sep 2004, Matthias B. wrote:

> On Wed, 22 Sep 2004 08:28:03 -0700 (PDT) Bart Schaefer
> <schaefer@xxxxxxxxxxxxxxxx> wrote:
> 
> > It appears to me that FreeBSD and Zsh are interpreting "could not be 
> > unset" to include variables that were not set in the first place. 
> 
> Arguing over the letter of a specification is not useful.

Firstly, I was stating a theory, not arguing a position.  Secondly, one 
can't start from the premise of "X does not follow the letter of the 
specification" and then dismiss all discussion of what the letter _is_.

> When your boss tells you to hammer a nail into the wall at spot X, you 
> go there and find that there is already a nail, what do you do?

Wrong question.  When your boss tells you to pull a nail out of the wall 
at spot X and bring it to him, and you go there and find that there is no 
nail to pull, what do you do?  Do you think he'll appreciate it if you
never tell him why he didn't get his nail?

That's not the right question either, but it's closer.  The right question 
is more like:  When your boss tells you to pull a nail out of the wall at 
spot X, and you go there and find that there is no nail to pull and no 
hole where one used to be, how do you find out whether your boss cares 
about the hole?

Nevertheless:

> 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.

(Is it time for "emulate posix"?)



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