Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Bug with unset variables
On Fri, Nov 27, 2020 at 6:25 PM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> On Fri, Nov 27, 2020 at 3:38 PM Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> wrote:
> >
> > The best way to move forward would be to write a patch against the Test/
> > directory that specifies the proposed behaviour. Use the "f" flag so
> > all newly-added tests will run, rather than just the first.
>
> There are existing tests that specifically check for the current
> behavior, so it's not as if this were simply overlooked.
>
> To write the proposed new test cases, we need to decide (this list may
> not be all-inclusive):
Yeah, I agree it's not as straightforward as it initially seemed.
I can write a test case for what I think should be the desired
behavior in the typical case: "typeset var" does *not* set var to an
empty string.
But that ignores most of the discussion that has already happened
here, and it seems in the Austin CSRG.
I bet it's possible to write the code that passes the above test-case,
but ten years from now--and if not, it will be twenty years from
now--somebody will try to add "local" to POSIX again, and zsh will
still be an inconsistent state.
Personally, I would rather attempt to do it right today, than add a
hack that sort of does what I initially wanted.
Maybe we are wasting time chasing multiple tails, but maybe we are
onto something.
Considering that POSIX hasn't managed to crack the problem after
essentially half a century, maybe a couple of mails in this mailing
list couldn't hurt.
When the solution requires creativity, you just can't know where it
could come from.
Cheers.
--
Felipe Contreras
Messages sorted by:
Reverse Date,
Date,
Thread,
Author