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.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 25615 invoked from network); 26 Jan 2023 14:46:21 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 26 Jan 2023 14:46:21 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1674744381; b=pxDi8d95IO4LkiTvkZVbp+sZPDRojkTXHaeefq2LHdvOjqL3fD1PC1KhSbBWf8blGrBUYao/iu xPLdlEcARc1sCkgcyamBSa9cyjAo1E/Y5xGhBTCiQD5oS7aOszAUW9l46sBwjGlH0Nq1Cr73fu Hm6/ExtQzqzDxZVmySXZv0JQibktiQwFCGn4MNvcgm3tnl2ALFCT6a8q21x/c1pRmOFnjd1jRR Yo/sMOCgWWTKw2yyHYrttKqRSqa9kNjHzT/BLjjeVlquMtTWimQCS3C4iN7uroLrLGOHL1vE4H gNbYhZFZvD2m0BTcqQRqXaSzIDgPCrqiVpFoF7t+mKxKBg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-lf1-f53.google.com) smtp.remote-ip=209.85.167.53; dkim=pass header.d=gmail.com header.s=20210112 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1674744381; bh=Y0rTdDRrbOqzJluXZaNcfP1xUWM8lG6TTNr7RY9UDJE=; 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=IAfUlzSxFVThFXyZmiTqr5lhd7adduaZdBx4p1aOaCXVCZQJVzkQkcqJlNLw5UX/j+98Ax8Z1P 0okKF5VN4zPdtfkbaeL1JEA0gXFAc38F6Tumcb0YKYS8Orlqck1aY+GYEgGnRZhsC7iIDQEMAW cN7wKD0RnzqfvcrFnnCXaNoc4v929PMbjm7ynUASvXl2f0fLkipb9QXDh40DkralfqUPgqNcAt m5JnrqUYxcSY4Es8qdaXg0RRVtb9cK1WZ6zVehRtMV3xHbseyAIfQ5IbyyB3QTHCagAPUMbjaj WVk2QcJaEQofDqbwo9Y8Iug1lhqnLlwDNo92sMdtV8F0Fw==; 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-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=STq9W4a/3IN8ZIR+0QOnMOZFmScfLeYn7R5SimxbYz0=; b=KMjlZxey5opGEkeI6fMELMmZxb hezYSQGkZ+x3lzMd+7ZM5gJ/JpIkztIkcCj4QiaWwZVJafXwGPSV9m0vYW4hWhPC9w7wMjogKoCm4 1AWmt76dCS+utg7Jx3X09CpPYeG9emrluk0v0ONm3ZpoGyX1rjtuab/wwlKs+DORWFuAvrLiTowgX K/WZjnwgBlq6ghYWUzVGlQz0lhdZTsx5ERetovnfP+vZRaZuChRcSUHl6b1hY6WjwBuK5QFgrSlF9 1B4F+aiK6VkvioPFZJGZD9Qgv7S04abkMwkiegRljr56PdHPlcd5qDLq5rKc7icgPu7id94KG+cud 3p0ox20g==; Received: by zero.zsh.org with local id 1pL3W8-000A6o-33; Thu, 26 Jan 2023 14:46:20 +0000 Authentication-Results: zsh.org; iprev=pass (mail-lf1-f53.google.com) smtp.remote-ip=209.85.167.53; dkim=pass header.d=gmail.com header.s=20210112 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-lf1-f53.google.com ([209.85.167.53]:46617) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1pL3VJ-0009P8-Nf; Thu, 26 Jan 2023 14:45:31 +0000 Received: by mail-lf1-f53.google.com with SMTP id bp15so3293587lfb.13 for ; Thu, 26 Jan 2023 06:45:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=STq9W4a/3IN8ZIR+0QOnMOZFmScfLeYn7R5SimxbYz0=; b=Lhg8fFuqHUJX/KmejSvHSEscqwTZ151jIbePWykJxlYYh31tfJ9vbBE0LCK1Mti24H L5VZLpqUNPG+GgeN+l6WMk3+VuMtzHAKg3TZd7NQgtuSUiht6Z2Q6/orrkZ4RISnn+7r 4xdcMj/Mn+kx38aIH2WZ4TK+jzddVrJAwk9yjGRxCH6N5cjMV7G7hZx/II2qqdyBApPm WdN6+5/E8sD/hg080EpcJNREs96o2ffE/6XTDxvP1yxUYziZsHSe590Opl+InEGtEwrF OeMBGDCCmANh5FieqqQEVaPkjapXhd0yuD9Zo/ShvQwfU9T9X4CsEcsjhoSyQzBITKjZ gmNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc: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=STq9W4a/3IN8ZIR+0QOnMOZFmScfLeYn7R5SimxbYz0=; b=inRUwN98Jqp+KOVBJUdzjwE69rf3R+gAtRUnV/ANT/1bltYAZSUOU302P8kO5wjrEx Fw2k9tO/lDexoP0byJvjANHaf1ZgQLxf6AHgEgxh5LlOyb98XTqSnNTjgfYpACRQkip+ 1JPNi4JeDpzCpWh38lEzysn6lEF59mJDq6HHCfWjOQ66BQueY86WfRmXXXdmtlqf391e LnyT9gzVwfT1p402vBZXrW07HesCBi1VeOyLmUPey6pjEl6Qdsbi1SRsr+o3s0kFUmMZ 1usXaK0bXm/HHYiezJM1iEDyY/rmi3H5kSDrEgJJlld2T6V7jJWh1YtwYnwTH7fuF7Xv MwgA== X-Gm-Message-State: AO0yUKVzy0BxFIXCXSI47PEPCK43lFtZe5PJVCgPhQm6Y9AHkERl8CFh O7KC2Z1GYdN7I61Jd7CdYdzFaS1ctcl25ObMvrELLaF/ X-Google-Smtp-Source: AK7set+Eyls+YbmEY/ksjTCcE3ErM8Puvk47/RrLN7J8Tf0659klTdMtitb7dj9cB+826CVYEvaMLPeS7LtdC5vYaG0= X-Received: by 2002:ac2:4841:0:b0:4d7:bda4:e6af with SMTP id 1-20020ac24841000000b004d7bda4e6afmr548043lfy.184.1674744328876; Thu, 26 Jan 2023 06:45:28 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Sebastian Gniazdowski Date: Thu, 26 Jan 2023 14:45:02 +0000 Message-ID: Subject: Re: Why no $match for parens inside a ~^ ? To: Bart Schaefer Cc: Zsh Users Content-Type: multipart/alternative; boundary="000000000000cff8f005f32bcc14" X-Seq: 28809 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: --000000000000cff8f005f32bcc14 Content-Type: text/plain; charset="UTF-8" Thanks, this makes sense. On Wed, 25 Jan 2023 at 22:05, Bart Schaefer wrote: > On Wed, Jan 25, 2023 at 6:53 AM Sebastian Gniazdowski > wrote: > > > > [[ "zparseopts -F" == (#b)*(zparseopts)*~^*(-F)* ]] > > I'm not 100% sure, but I think the problem here is that the negation > with ^ is processed in a secondary invocation of the pattern matcher > so the $match from parens there is overwritten by the results of the > previous pattern. > > This behaves differently (but perhaps not quite what you're after): > > [[ "zparseopts -F" == (#b)*(zparseopts)(*~^*(-F)*) ]] > -- Best regards, Sebastian Gniazdowski --000000000000cff8f005f32bcc14 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks, this makes sense.

On Wed, 25 Jan 2023 at 22:05,= Bart Schaefer <schaefer@br= asslantern.com> wrote:
On Wed, Jan 25, 2023 at 6:53 AM Sebastian Gniazdowski
<sgniazdowsk= i@gmail.com> wrote:
>
> [[ "zparseopts -F" =3D=3D (#b)*(zparseopts)*~^*(-F)* ]]

I'm not 100% sure, but I think the problem here is that the negation with ^ is processed in a secondary invocation of the pattern matcher
so the $match from parens there is overwritten by the results of the
previous pattern.

This behaves differently (but perhaps not quite what you're after):

[[ "zparseopts -F" =3D=3D (#b)*(zparseopts)(*~^*(-F)*) ]]


--
Best regards,
Se= bastian Gniazdowski

--000000000000cff8f005f32bcc14--