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=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 13320 invoked from network); 23 Nov 2020 06:48:31 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 23 Nov 2020 06:48:31 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1606114111; b=1rcWmquXs6YKJYhpCU38QBHP45JTXiqNOSAj/JMgSqJp6Xle+7qwz9GLDj1rQ6p+B54DwMRkps PyBavrz/2Vs2WVXindkK1+oiAkAYN2Fgt9keTdVkcq7yRpOBmo8bwbqmruFIWTXfTtPkuwTOOR elrdb/I3dDPuECWnV9UwiRFssyVvo0V2xIbhTTYh18lPxaaFj4vws3j9UOm4h5qA1XQCS/WVvc bIrEWEuie0Uccq/DzZcr3vhjTlYljp6C4VUdVvXq68sQwAhyWE6c3gbwEukGEaVwKAri/agUjG gHOKEIpDi6z4ksyTdoN/inuVOgYnvjnTarc7Jq/iA99I6g==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ot1-f46.google.com) smtp.remote-ip=209.85.210.46; dkim=pass header.d=brasslantern-com.20150623.gappssmtp.com header.s=20150623 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1606114111; bh=Rv1AeBfbHR16y5EB9AH8LRVYp4rCpFwHd78D5cCiz/Q=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=wP2GfYqvSwGX7o2sRHURRJywsi/dT65HU/JUzesE+NCsmwtwZ0X3GUjx3sjjd0xdKy7OPNOPqJ tOI3F25BU9jYxuGyxVi5Sjt1pwIL4QyIkhT25AFtBTOpo1EtCKA0ImnYfMuAn+XRH6XjHTlyDy 2m+qWfTiMsyPtpqW5xBoHQjXmqbENrOCKDlql0CMKAaPC71I1TKiNbdR05AbMJT0pMdv4IiSs2 AlszKaBHBY9z/U9/nBNUYonNTSihi3B9crkJet8AVScLo9iKO9TY0squW2R1LCC72NBEgMBX4s +/hb2x6lte8Shly5Rv+6fXav2EiidfuZot2Ce5rZ7AUOjQ==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID :Date:From:In-Reply-To:References:MIME-Version:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=OhELa55gTFTerxYwuBFKMLiaxQnRZ9dWfD3uTX7vc4I=; b=hxWn88nENPPh4g3zSAFHp0DM17 GudzmaR1EujCJmce7BxhHoMQJfZpuIgM4modzh058yrnbgYHs7HkKwbrlPwKOUvElVaKdzPD4chnb HJsEkWHBntR+VIpvzIGQlbuHdjYoYCC1std+tSTAFiZT8RY95/vFEmaH66LUCqbaWR6NBz980xd/E rV8VsAWoh47yzA9xu4WumeaOzh++tqmj3hK4IJjkZZH/vIEgjsv4jXZBLkKe2zAewAhssDm0QQNbA rsphqXbGa0B7wRlq9SvGAvu0LefUQA0XQ8edKQyVr8surkuSFDVzD5J0pGP1Ig3IKnvjpzvO1YP8T C/cfyA5A==; Received: from authenticated user by zero.zsh.org with local id 1kh5eJ-0001Gr-GF; Mon, 23 Nov 2020 06:48:31 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ot1-f46.google.com) smtp.remote-ip=209.85.210.46; dkim=pass header.d=brasslantern-com.20150623.gappssmtp.com header.s=20150623 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-ot1-f46.google.com ([209.85.210.46]:37136) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1kh5e7-00017V-6V; Mon, 23 Nov 2020 06:48:21 +0000 Received: by mail-ot1-f46.google.com with SMTP id l36so14975075ota.4 for ; Sun, 22 Nov 2020 22:48:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=OhELa55gTFTerxYwuBFKMLiaxQnRZ9dWfD3uTX7vc4I=; b=OnTZ5yYvuhuAz9PaODP0DpTq0T6jm/zikHQBOplKOBeFj1xx4akyXjpq9THJn+FQRU p0abIEpwxk0ScjW7pJHW9aYgT4pnK388iwtLcvyMHTtgENQF8k22wz/k9QtqUvxHcAI8 +MLShk0JT1kpCZ6vRcAe7bt2ITjEMawOwXptdk5h1u+zp8A0kiTRK7SZxBrLPMewHO60 mMOTb2QL3KopgqRUCAUXF9ysCgw+zr0nBuOW27aMw/V5QLZW7mNF6rcCEg1HLKEDcgDG gMCFWsbxBKDSrDAtUTBFzNDV8R03BHwrpz4yEUeuupzakD9qjd/n1+5SHbGV+hfh/uE5 pY1Q== 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=OhELa55gTFTerxYwuBFKMLiaxQnRZ9dWfD3uTX7vc4I=; b=tdN8b1YEIE+d25bPN91F0fM0r5AGjRZzGPJ34RsWMw7SN9BOtrGL+p/c07AADT7nx/ h2IVdJgF/ifb/WR2JctELdsEX4IXYlPuC8xde287iExF6N2ljVgusYE1cnwCLWjW0+Bk rJD4YleQYd+Uta5Nh90EH9INX4gNRnux6jJXFdb3XQMXq6pIPKJleXcrXPWR1RJNDvM4 o98FtQrIrYtaUK/7g07q0hznKyo2p4jVbILb9KqW/QwzFyLcdfzS6vTJ43Jqx1Zvnbyt lpCj7eFST+CY+18z20pPm2uYtSVlWNQEyFXb2tQEUvOVRgGsvORZxZeQmM0vbAIR9+M0 FNOQ== X-Gm-Message-State: AOAM533XrhOkFfbdl0OBLh+DhgP3NyK9JFzz2B5LytSjknT5AS+pcEva wceLf9tEGO4JmgOwJ/PMyB37ax2ZBLEbfYz7RWlNdw== X-Google-Smtp-Source: ABdhPJyI6dJm2GZq6ERRFE7lWT0jKsP6dNUQjjqT+rhGqYTBo/IVRrFnKZbbKtCPlxFqtO3bgrqyndjvAMD73ZtXZWk= X-Received: by 2002:a05:6830:1552:: with SMTP id l18mr5840969otp.229.1606114097913; Sun, 22 Nov 2020 22:48:17 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Bart Schaefer Date: Sun, 22 Nov 2020 22:48:06 -0800 Message-ID: Subject: Re: Bug with unset variables To: Felipe Contreras Cc: Roman Perepelitsa , Zsh hackers list Content-Type: text/plain; charset="UTF-8" X-Seq: 47603 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 Sat, Nov 21, 2020 at 5:49 PM Felipe Contreras wrote: > > On Tue, Nov 17, 2020 at 2:54 PM Bart Schaefer wrote: > > > > There literally is no concept of "not defined" in the shell language > > outside of that implicit ternary; undefined is not a first-class > > value. > > This is a smoke screen. This statement confuses me. If you are insinuating that I'm raising a point solely for the purpose of obfuscating the discussion, then either (a) you haven't been paying attention to anything I've written on this mailing list in the past 25 years, or (b) I'm forced to believe you're actively attempting to be insulting. > It either is *functionally* the same, or it isn't. You keep "shouting" that word as if saying it louder is all that's necessary. > I was not the one that brought history into the thread. You are the > one that brought the history, which by definition cannot be changed. You asked why zsh's default behavior is what it is; the answer is historical practice. Unless I've misunderstood something, the subsequent discussion has focused on the idea that we should change the default, despite that breaking several precedents, because the default behavior is not internally consistent, and that the reason it's not consistent is because of the notion that unsetting a variable is equivalent to assigning it an undefined value. Even if we grant the latter, which I don't think everyone does, it still doesn't follow that the only consistent choice for the default state of a declared variable is unset. > My understanding of [KSH_TYPESET] is that it changed the behavior of this: > > typeset var=$(echo one word) > > To this: > > builtin typeset var=$(echo one word) No; it changes the former to something closer to typeset var="$(echo one word)" because *without* the option, it was interpreted as > typeset var=one word