From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: from zero.zsh.org (zero.zsh.org [IPv6:2a02:898:31:0:48:4558:7a:7368]) by inbox.vuxu.org (Postfix) with ESMTP id DFA46228F6 for ; Mon, 25 Mar 2024 18:34:11 +0100 (CET) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1711388051; b=LfegERZPY9d+hOfq2i5ASuLICDYFsr3OLrAIEaLTyIMmnoWpWG6iF41oT6yu/BPmeoaCSvo6AI W+4YO+dPNUVfc0JehH6VFFPNTGtu/yvSvM+M/z5gSf499u5IUwcODaNY0sadNtCaGJarh4XM0o WdFwXT1SCy2l7aEBF29YDCQVjReNuEMwJ6Vb56sezIAyjrmrJNhoSinMX2kBBNWrqimMLMQk+w 4+HpB08BJyISb94W/v/52xvbh5a2x1fDVuAmXsvktnDZKWZN+NVS0OT+rA7jA3EUImxr2HLhzB wAaXS6hD39FhgLvXEYaUAzdqLr/rtwWIzwFkVUYDXBbnsQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (cventin.lip.ens-lyon.fr) smtp.remote-ip=140.77.13.17; dmarc=none header.from=vinc17.net; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1711388051; bh=Nup/a3sZRxvhe5yexCEqeY0iD6s/OO8CqijrK+N+EyU=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:In-Reply-To:Content-Transfer-Encoding:Content-Type: MIME-Version:References:Message-ID:Subject:To:From:Date:DKIM-Signature; b=G5ArkH/d6300kPp2l4qPdP5oNAwE+tc7GHeoPuUTRCGEpTtKKguSs40YfcdSxGh0Kq3C86YuR1 1SPn1tS3YWHRs4Cu5gd4kdUpdbHXMwW7Vm5vcF07kr8wtMAonIyVKxFOfk5ZSUFudh4S2DiYCt 5W4Kh0aH91HEQlzO8guXxLgdVzhzGnvTyaDY91hWl3Lks7lRyLbDPszRCt7IjrDx1cdd7OGxVe hDJ1FUE8EdtQSgh/MwrdQFNv8aAtISpfIbrCirn5iaY1437K7G7Hv+WThFtaQApN1XMQaV6UDe MCsF8CVq2PloThERL+iLoRolhUMQUvNxiF9IeLyL0Ro9pQ==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:In-Reply-To:Content-Transfer-Encoding :Content-Type:MIME-Version:References:Message-ID:Subject:To:From:Date: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=TcQz0qPcwmKQBO0cXPiHkjunQ2659u6oBNOZQ9C0NBQ=; b=QTPc0gYqi+TKQ65osn15O4xPvD DcDYtWAsoIbFxiHP0oQRBFv+I71NbsIn1T8cJ7J4clM25Gop7edN01JYd2AZk6AsCNRWIT5xkgxqm 8wriMWwg73wzJZHCssI3yGUOZK3xyFvqjqg913DJQRzLfV/sZncNc3u4hKnVrF0gzk/mnVLca+RTA sIxQ2wgF6p7EQuAXYgxlQ2+iUxX0IoFZL2QcCqDd+PQlwu02P1HzRnXtILjy6ubhN+tvP4yFag2FT CSvKenmDJu+m2KS0kzc0vgrJAu9bCmFQwkh5soojBqt+Aosw82Zvue6W5tlS1dsCYzQoTVi85AnIr bZ/JiXxA==; Received: by zero.zsh.org with local id 1rooD5-000OIi-A1; Mon, 25 Mar 2024 17:34:11 +0000 Authentication-Results: zsh.org; iprev=pass (cventin.lip.ens-lyon.fr) smtp.remote-ip=140.77.13.17; dmarc=none header.from=vinc17.net; arc=none Received: from cventin.lip.ens-lyon.fr ([140.77.13.17]:34028) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1rooCU-000NxL-1R; Mon, 25 Mar 2024 17:33:34 +0000 Received: from vlefevre by cventin.lip.ens-lyon.fr with local (Exim 4.97) (envelope-from ) id 1rooCT-000000009Z0-1B0b; Mon, 25 Mar 2024 18:33:33 +0100 Date: Mon, 25 Mar 2024 18:33:33 +0100 From: Vincent Lefevre To: zsh-workers@zsh.org Subject: Re: behavior of test true -a \( ! -a \) Message-ID: <20240325173333.GA6054@cventin.lip.ens-lyon.fr> Mail-Followup-To: zsh-workers@zsh.org References: <20240321100710.GA164665@qaa.vinc17.org> <20240323222036.GE164665@qaa.vinc17.org> <20240325102354.GA617604@cventin.lip.ens-lyon.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Mailer-Info: https://www.vinc17.net/mutt/ User-Agent: Mutt/2.2.12+69 (354c5b11) vl-149028 (2023-12-10) X-Seq: 52814 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 2024-03-25 08:21:53 -0700, Bart Schaefer wrote: > On Mon, Mar 25, 2024 at 3:24 AM Vincent Lefevre wrote: > > I meant that > > > > test \( ! -a \) > > > > has four, thus fully specified and not wrong. > > And I meant (in the follow-up, being unaware of the exact spec at > first) that I think it was wrong to specify it that way in the first > place. Well, "test" with its ambiguities between strings and operators should have never existed in the first place. > I suspect that we're re-hashing an argument that's already been had on > austin-group and led to these constructs being first declared obsolete > and soon dropped. Dropped from the standard, but not from existing scripts. > > Concerning > > > > test true -a \( ! -a \) > > > > I would say that if you decide that the first "-a" is an "and", > > then after this "-a", there remain exactly 4 arguments, so that > > for *consistency*, I think that the remaining 4 arguments should > > be interpreted exactly as in > > > > test \( ! -a \) > > So what about > test true -a \( ! -a \) \) > ?? With zsh, this is consistent: cventin% test \( ! -a \) \) ; echo $? 0 cventin% test true -a \( ! -a \) \) ; echo $? 0 The other implementations see consistent too. -- Vincent Lefèvre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)