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.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,T_SCC_BODY_TEXT_LINE 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 65007255FE for ; Fri, 23 Feb 2024 01:34:44 +0100 (CET) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1708648484; b=L2yyfysa39l0kdonKKOs6kGQefX0y03ZkXOJjdhtq806bHzbgcVdACXkFhS2CcvoqvoywCv0nb wd8JvQU1Kl01mMJgof9+tJxFphQUQDMJFfUXGWcWEs3n2o8GMNNLQpdhE+gf/6QDJ286+38NJ7 gyUOZeGHi7e9ZhgMSwN7WtbNd2Ir1Z+VwZ+OIZEGJAU/QUo4Uab1GH+AhdfaseBHAWA2Enecdr m/CPcEKvgYMnouKiGKqrwec8rAamtzyyDKSieKLU/1wPcc4+/GeHyUloWszdQiGJuBE340Ty1S eK47sQrpBiiqgXLxSTLF1cn5R9YJkzPmebGAhYBS6o8bJw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ej1-f47.google.com) smtp.remote-ip=209.85.218.47; dkim=pass header.d=brasslantern-com.20230601.gappssmtp.com header.s=20230601 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-20210803; t=1708648484; bh=x/yBNQyoULzzmJ5dXX1WpdeA1q0AqvPC0qqCLm9XrkM=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:To:Subject:Message-ID: Date:From:In-Reply-To:References:MIME-Version:DKIM-Signature:DKIM-Signature; b=JgpgIeUzvmbnE1RGhEhWHmy4Z6dtDx3w4m7X4sRq7FUVezs9X69s61DF2qak1zsJ6JtnBpsa68 IAycEFy62eHtt2i0F2HsEKBlW0qb/sLmp8fRHBQId2MzbBt1udGG0/RPeb3cIspZckjYLdTfFn 2GKI5CdzDanYXU3TUIt2F1VbcOfJdSbhVx+XuweaI12u/CETg9+3vWA4dtIQymXM8T7QKAOrYe 0KLLx67mjQxysJbHrAzOWJHW/s961X6SP7A4jp8E3yry/jg9B1dH0abXgeSsw31FpL/2x26EQ3 opnlgzvuDkJP6rd9KtbWcoWMyXICLxNl2iPFhI3mX6Rb6g==; 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:Content-Transfer-Encoding: Content-Type:To:Subject:Message-ID:Date:From:In-Reply-To:References: MIME-Version:Reply-To:Cc:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=xSm1WeoazRnsH0W7MyT8F9GjhiTeEoPddokWi5L1RkM=; b=cmWvLNtCqGEqREsJ8ex14F1SBr Y00BF24bbTWk+MuLdEZ7KhekQCTiHTwItkx+zzNth9OcHf66c1luxPuxIa8Uk12ERSYeiNd6YtjTl gEqPxfWTXWac+0uuLAspt8YMMVoQJKrXzHUU+4hiWfy2wCNotgJV8X0Qg5BUiFI+ucFzNXJBVkWuG uk1gCUIGQttiIr0SaRABxxZqwtUaBRUjTAGbozrvr9sW/+hSZ4ebIvb9i9NsNj2coE7N9sV82da7z CfHfh6D5EFpfLwy0Ds544Lwm4HEoEeRAAcLS1Z10RifWyWJz8JkixFgf09tuSmBEpfYpj4UzTCnBf UkUa2Zag==; Received: by zero.zsh.org with local id 1rdJWW-000JBy-8T; Fri, 23 Feb 2024 00:34:44 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ej1-f47.google.com) smtp.remote-ip=209.85.218.47; dkim=pass header.d=brasslantern-com.20230601.gappssmtp.com header.s=20230601 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-ej1-f47.google.com ([209.85.218.47]:48374) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1rdJVx-000Irv-Eu; Fri, 23 Feb 2024 00:34:10 +0000 Received: by mail-ej1-f47.google.com with SMTP id a640c23a62f3a-a3e891b5e4eso37601666b.0 for ; Thu, 22 Feb 2024 16:34:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20230601.gappssmtp.com; s=20230601; t=1708648449; x=1709253249; darn=zsh.org; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=xSm1WeoazRnsH0W7MyT8F9GjhiTeEoPddokWi5L1RkM=; b=Gni6JKq1oZdOkz6ObrFLLJSQl+HN6GySWY9cjLBnxj4obhGJj32s8F8rN1Is/MN3d7 /p7OFNhfr3a06tqRK33do25HgAj7yi4cM/7Ry3pCp+AdvCBmCzQJp/H3aixsdwKHrr6F Qqkm6J3VX9xBeh5AEzBfV2i6bjWH9jHEgHK9gpLUNFBqrc3+bk0hQ33Xw9BtEgugl48P nMK+3uE/MiIC+CpEe7kGPIivZbdgPQmObzr6bvJN3uTz2/j5tmr2CGp/sxmG/Tf5Q7uG AD+uDSYDCBumX5ps5vYwpTDkiuwjsihU5C6muJ819fVXyrCOp3PtI0fKeKasQOvANP1i dibQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708648449; x=1709253249; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xSm1WeoazRnsH0W7MyT8F9GjhiTeEoPddokWi5L1RkM=; b=wJB/hAUFHuyHKD9iZRgbaFboQd1hXoaZqVD+RulmhBa5dxk6neVomt3LxrY6JWVoHO rzOuyS8sonXhfHp+1hn29kDxkMqKo6SFijvBeShcLrS2fFSxmxTREk63xK/SpIJucS2G Q1YN+p+V73iAZ1rbNK1m8lvWb0QeComb+elWTJezbVDe2kgce7Q/alINjMcEVuYkcoq3 ooIpxVe6Gjc9h04PHFbCRyPQjAds5qhpoxjVmm3rWo9wgDi/2k3RSWDr1bBktNJVli8y j4WF7n45h3R9snz4+0+8JJj+9hSItmztKQI/ZgXV6Am3goyuhteOyE4oIjc9/eM4gQZ7 nIYQ== X-Gm-Message-State: AOJu0Yy5scPvWpfXu05m9sJPPnBLv7lpW/SLMuy68IuMYiK8/nZ6ehOL L7JOl0CVdgU1ZCWqUarE46hLbdR9Zy9PRzRKygCYOvYx9WHqWBqzHlxZZp/7//cShwnIOfk/je4 xwVgQPIYK0c1Cd867gYO+0VyTXV8Em0Avn/lmUBszU0FFn8Q= X-Google-Smtp-Source: AGHT+IGshakbifLcqCuVFqRnz/FyGAmyp/epzfDW5DdsJpRTk/hhuv2DNnx8ilnDPGhBH7ZY1JtTRLd0u1n1FCvYPA4= X-Received: by 2002:a17:906:154b:b0:a3f:5144:ada2 with SMTP id c11-20020a170906154b00b00a3f5144ada2mr242708ejd.2.1708648448544; Thu, 22 Feb 2024 16:34:08 -0800 (PST) MIME-Version: 1.0 References: <836025199.2014747.1673889335246@mail.virginmedia.com> <20240220070505.fd6jfbcdldieqv7u@chazelas.org> <20240220193911.avnmcqfliwltkj5m@chazelas.org> <20240221194534.o2mufin7orng6ttg@chazelas.org> <20240221202150.tccftcqbxqqexq4x@chazelas.org> <20240222072313.7woy5vxvt4fbxyhj@chazelas.org> <20240222075528.eruaoosiuhmcrdsy@chazelas.org> In-Reply-To: <20240222075528.eruaoosiuhmcrdsy@chazelas.org> From: Bart Schaefer Date: Thu, 22 Feb 2024 16:33:57 -0800 Message-ID: Subject: Re: Metafication in error messages (Was: [PATCH] unmetafy Re: $var not expanded in ${x?$var}) To: zsh workers Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Seq: 52581 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: Incidentally ... On Wed, Feb 21, 2024 at 11:55=E2=80=AFPM Stephane Chazelas wrote: > > $ printf '%d\n' $'1+|a\0b' > zsh: bad math expression: operand expected at `|a' That doesn't have anything to do with error message presentation, the integer parser itself stops at the nul byte before even checking the error. GIGO. And the differences in these two ... > $ printf '%d\n' '1+|=C3=83=C3=83=C3=83=C3=83=C3=83=C3=83' > zsh: bad math expression: operand expected at `|\M-C\M-c\M-c\M-c\M-c\M-c\= M-^C...' > $ ((1+|=C3=83=C3=83=C3=83=C3=83=C3=83=C3=83)) > zsh: bad math expression: operand expected at `|=C3=83=C3=83=C3=83=C3=83\= M-C...' ... are down to the parsing of quoted arguments vs. ((...)), with some fudge because of the way the use of ellipsis is calculated. This would have to be sorted out in bin_print() or something.