zsh-users
 help / color / mirror / code / Atom feed
From: Sebastian Gniazdowski <sgniazdowski@gmail.com>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: Zsh Users <zsh-users@zsh.org>
Subject: Re: Why no $match for parens inside a ~^ ?
Date: Thu, 26 Jan 2023 14:45:02 +0000	[thread overview]
Message-ID: <CAKc7PVCohT8mtjykP0gHasj3sLZXmvhm18PBbcHzU_mS-5q-0w@mail.gmail.com> (raw)
In-Reply-To: <CAH+w=7aEy9Z+mqRqvZebDsb4taRYe6cg1AY2emLbA2NF2fOt4g@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 666 bytes --]

Thanks, this makes sense.

On Wed, 25 Jan 2023 at 22:05, Bart Schaefer <schaefer@brasslantern.com>
wrote:

> On Wed, Jan 25, 2023 at 6:53 AM Sebastian Gniazdowski
> <sgniazdowski@gmail.com> 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

[-- Attachment #2: Type: text/html, Size: 1292 bytes --]

      reply	other threads:[~2023-01-26 14:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-25 14:50 Sebastian Gniazdowski
2023-01-25 14:52 ` Sebastian Gniazdowski
2023-01-25 16:31   ` Sebastian Gniazdowski
2023-01-25 22:05   ` Bart Schaefer
2023-01-26 14:45     ` Sebastian Gniazdowski [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAKc7PVCohT8mtjykP0gHasj3sLZXmvhm18PBbcHzU_mS-5q-0w@mail.gmail.com \
    --to=sgniazdowski@gmail.com \
    --cc=schaefer@brasslantern.com \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).