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 12298 invoked from network); 4 Jun 2021 18:36:55 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 4 Jun 2021 18:36:55 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1622831815; b=wvQHLBH7w5UpPtE2OE/BLwY3Er8B38RpbOBPZRkAmP8tdqIOcbI6n9xL/x/t3dcdhnLqw1DVYF Y03gnh1ecf+/FfoiD18Iklw8OrwNT1JJeBng2E/7bUet18OhGmaTAhe57OFosujAx3nXgW038g hwKnbd3uxNSUFaFEiPJG/4GNCxhoNduqCFkf41gO1JrIDOd29QSxgvxMA+qsFD77pTh6sUdilQ ZK2I73JzR/4hHcFIwP/On/fs8F+dkhN8LQiPTemZXlWBmBGFOqQiSHxRUK69kD/ag0mmp4XR95 XV42Tmdx+tjC0YVlrwBcv37K+akQbXYc8q/RhRX7JlbJ9Q==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-oi1-f182.google.com) smtp.remote-ip=209.85.167.182; 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=1622831815; bh=zxYpkPv1cSp0kDywOh0CoDLROeslxs604tm+K3DDw5E=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=oiNLz3jN5kKQFHCWxTITPjz6JGOqNRui0CrrvV9zLHt0xyzS3+0wG1+HsrMXz93P46igm+e9e1 7r26UrUmECbUFDwPLooAmKuAjDb2PvaAde2LHaEIVdHQ4cs93PHEd4yImAWblFzErjrEJkrWgQ 014Q9GZGOna3lADi89wKdesIIN5W2FfrtgV/fOA5uql9rV7LS1ETMZQiZ4L7HVp6adU5dKnJb8 3pcyv7w+IpnvEed937wpDIBD0FaMOQvbYgarEUAcHgGgtqhn60RlcRNe5Gdmc/34gjeqyBJ+96 4a4rerOti91Rvz8GfRu0Y1DufYDm769GuzsHdCLoyLaE9Q==; 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:To:Subject:Message-ID: Date:From:In-Reply-To:References:MIME-Version:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=vywF1rNl+j1ITqGl7GZtW/3bEAuvdJXoe1jXihlTeBQ=; b=xbDWvrZyYpytWppKqzC/N8GE/r atUWixZJLBBB7Y6oj2MzZRLApACMjE48WSzbtZ5LDA0/3b9DrNPJUFEVvM7CBrGwhSqvVT9SgUMSk +jbSEGoB6Os26lZDwNqlHgtLeol4TTJX1iwGmy7pbwgeZ2nMt4v/49R+FcRhPH2FNxaavHjPxtVWA ytdjyJUESzMbgVkF/SsQb9Nf5GW6L1EXX04XV1VWlHHqV/31DnsDVaCNZmRIoVf4D/6UAaL8ivine X5E+yIs5bUvCYB7XD5DjHKP1GcJllfy2+R/IbtNNsov6yulGpZbZ3HZJlPXWgKlZ6pojHZhcHMZSZ Lqhlw6qg==; Received: from authenticated user by zero.zsh.org with local id 1lpEgf-0009UD-Rg; Fri, 04 Jun 2021 18:36:53 +0000 Authentication-Results: zsh.org; iprev=pass (mail-oi1-f182.google.com) smtp.remote-ip=209.85.167.182; 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-oi1-f182.google.com ([209.85.167.182]:36580) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1lpEgA-0009B9-1z; Fri, 04 Jun 2021 18:36:23 +0000 Received: by mail-oi1-f182.google.com with SMTP id a21so10685567oiw.3 for ; Fri, 04 Jun 2021 11:36:21 -0700 (PDT) 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; bh=vywF1rNl+j1ITqGl7GZtW/3bEAuvdJXoe1jXihlTeBQ=; b=hmLBbSGyu8GJQMRfs17ay2DLAxitSemRYDiPyVdznhjHbp6dENW3tx/6FM7ZLUAjR9 8yfG+G7LMb1e0dzS2kERbxXwTRnYYNgdylLx7sH7PdvTb1sWfcI8eq6AxNu6V2JHvZnB EMsJtBH4FwphYyXM7AF7gFXFNDXJFmPID+y+q3YzHXkj2Gmc99rUjc5JpoVRPm1jvmA8 H7sf66c9j0EgjlMO8Nc9r/wtlvOpOaD+4gg+YDXf/O//VaCqOGia195AIbwNiyFA37us q4WvVq+Mxpf3vtPvNuoStSHWgPqph+gJD0XlYzKlmVuj2AlpHSe5TP+3p1SQp+mV6/Es Gu+Q== 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; bh=vywF1rNl+j1ITqGl7GZtW/3bEAuvdJXoe1jXihlTeBQ=; b=h1M3jIo7DyGa48aWt3miQJ91VoYj1CbSi5RvYdMI/v8lPGHkC9D12bbb6tr1rZZrpo 7uQjlhYEqAi7pscW6UAKP5tt8lK0Tu0bQ79Vak7os8tTB8zZDCaBUeNO5EgCp9jLL+ok ZEN6BJsw0qwq9B1j9kXL2qr3rNq9H4Vp4ljnKTk2+LXZSCKv/mrMmy+LW8iKGjnOMZE7 AGHl9eaYKTetnJ6++ycXlKe1s3PdpJMAv/fntvI6BZyD0mrVnZjh/VJIOs3VX6t2VPK1 nxxuErgz8WHcI6Abaf/mJbipXVwm5SORVcvzTP59CCYO/tZmeHAjKcKU2Jktu1Z4vcYz nJ4A== X-Gm-Message-State: AOAM532HuCAjIDCk/OtHb5/8EJy+fMHqICQdh71oaFPmODbfIZdna71o 7X6pVM/O6O9/yf3FID5p998Iqqfo2QdQNf//f5v1Kw== X-Google-Smtp-Source: ABdhPJxVG0MtsjdPGIb+o5ATdWx/nSQbYSb377BNK4D4YAk4cP5gESsEh+XVtpsIgXLL3rMrpxW9Arw7wZbqjjNKGEc= X-Received: by 2002:aca:f452:: with SMTP id s79mr2434152oih.84.1622831780604; Fri, 04 Jun 2021 11:36:20 -0700 (PDT) MIME-Version: 1.0 References: <20210602091145.xvyymjxdors6kqya@chazelas.org> <20210602142005.b5tw2hj2c6q3psqv@chazelas.org> <1629605749.599911.1622710481163@mail2.virginmedia.com> <20210603131347.i7bv7ao7j3hk3a2e@chazelas.org> <20210604080200.pnlzjexcuu3oyjcy@chazelas.org> In-Reply-To: <20210604080200.pnlzjexcuu3oyjcy@chazelas.org> From: Bart Schaefer Date: Fri, 4 Jun 2021 11:36:09 -0700 Message-ID: Subject: Re: [PATCH (not final)] (take three?) unset "array[$anything]" To: Bart Schaefer , Peter Stephenson , Zsh hackers list Content-Type: text/plain; charset="UTF-8" X-Seq: 49015 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: On Fri, Jun 4, 2021 at 1:02 AM Stephane Chazelas wrote: > > It also means the lexer, a large and complex bit of code whose > behaviour also depends on a the setting of a number of options > will end up being exposed to user-supplied data (of the users of > the zsh scripts, not just the users of zsh), which adds some > level of risk. This remark baffles me. The exact same code is used for ${v/pat/repl} among other things, I haven't added any new entry point to the lexer. Still, we're continuing to banter about what I think is the second-best solution anyway. > Currently we can do (reliably): > > read 'hash[$key]' It's unfortunate that this is "reliable" because I'm pretty sure it's totally unintentional and should be considered a bug. "read" should not be re-interpreting $key in its NAME parameter. > and can't do (reliably) > > read "hash[$key]" That one ought to be reliable if using hash elements here is permitted at all. > If we align with whatever solution we pick for unset, we're > going to break a lot more scripts. I don't think we can touch > those at least in the default mode operation. I don't know how many is "a lot" here, because frankly this is something I would never have thought of attempting in the first place (particularly, relying on the buggy behavior of the single-quoted case). But I really want to STOP talking about this in the same thread as the "unset" question.