From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,RDNS_NONE,UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.4 Received: from authenticated user by zero.zsh.org with local id 1kiyz2-0001HM-81; Sat, 28 Nov 2020 12:05:44 +0000 Authentication-Results: zsh.org; iprev=pass (mail-wm1-f51.google.com) smtp.remote-ip=209.85.128.51; dkim=pass header.d=gmail.com header.s=20161025 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-wm1-f51.google.com ([209.85.128.51]:35607) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1kiyyi-00012p-7r; Sat, 28 Nov 2020 12:05:24 +0000 Received: by mail-wm1-f51.google.com with SMTP id w24so8765340wmi.0 for ; Sat, 28 Nov 2020 04:05:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=UdM2aVP2qkocdXFeRFGku9aCk4y0bXBcW0NJLgrUjyk=; b=rVF9+VaN+PNGD2hxeoGChHypupT7kML0MS8ksG+xldHMI1nRErXR/qG10xQNmboghN OyqN3dziqrJQxRtP08E9rJycCyLq56cZ+RksK5RKp8cF4muuACCrIyh+PNoqyHwAsVwJ 3IPee5J7CdjhUX2E91z3z3k2uHdSoJpXphgsqv8HkivCpkTDgQXKSds2untDH4wTVsLs x1/ippZRA7LTJ4Gfhzvs/sP+dIrXvzGVoB1d1UfdjSC4V5HBm7vyWe4mMPKjiJIhLRpz vlGfmciiJXzd8bFqQM3iEae69Vsy1nTtiS/Su5VYVA8y/OBmAK2TeGa8ee4ywzNlUu3F xusQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=UdM2aVP2qkocdXFeRFGku9aCk4y0bXBcW0NJLgrUjyk=; b=Hi2OA96ka6ulCp6XC+ovOTLGIUnxSE8Lczk/57rioQrkVBlF1hsvNkcx1rivr0hQIq lcOOo1AspOdQPiLl4BA4AjZZ1mA4G2ZoNJ2qidz4vn9BTUBcB7OlaekjCo1YtFGtb6i0 2Ym0ZUpn8ftPLrTAsPXNPA8vMvDXLe8IGH32wSZDlFhCRxdCw0V9Hr8A3aOApFG3D9Me 2k/De4apiwXJydMdYBP64nxqwHpoD6IlC8+rV4/qcSQGqcSJ62A9jxVxHg6NyUVUoMOU 1/DL02GhshiNSM2ijAHNCjedbppy2QBzg7FyEBfUKUrU00qWGdRGu4q3ajFLk0/QFHWB M5Sw== X-Gm-Message-State: AOAM532yUnOtvq0K8op6fC3MjaAy1xLG2gD13K9Z+N7xyG0iXn3BhII6 0fL5PEhKv48jguZ+s01pQVuelDBvxaX/u41jBnE= X-Google-Smtp-Source: ABdhPJwI8eppH4bkiGQZ5JsGebGTtC48Eg3ew2eW1TH9ZRxMwteUfuKqNv6eIOJmJ32LaxCGMvFzVNAkF97oQ2jeu0E= X-Received: by 2002:a1c:f619:: with SMTP id w25mr14328490wmc.55.1606565123858; Sat, 28 Nov 2020 04:05:23 -0800 (PST) MIME-Version: 1.0 References: <20201127154439.GC26720@tarpaulin.shahaf.local2> <3246311e-c4b2-48f3-8baa-d271591f0029@www.fastmail.com> <564f91d0-fb87-4472-a566-a5e261ef8ae7@www.fastmail.com> In-Reply-To: From: Felipe Contreras Date: Sat, 28 Nov 2020 06:05:12 -0600 Message-ID: Subject: Re: Bug with unset variables To: Bart Schaefer Cc: Daniel Shahaf , Zsh hackers list Content-Type: text/plain; charset="UTF-8" X-Seq: 47695 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: Archived-At: On Fri, Nov 27, 2020 at 6:25 PM Bart Schaefer wrote: > On Fri, Nov 27, 2020 at 3:38 PM Daniel Shahaf 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