help / color / Atom feed
From: Peter Stephenson <p.stephenson@samsung.com>
To: <zsh-workers@zsh.org>
Subject: Re: PATCH: Update the description of S flag in the completion
Date: Tue, 3 Dec 2019 09:42:56 +0000
Message-ID: <1575366176.5200.3.camel@samsung.com> (raw)
In-Reply-To: <CAKc7PVBW8sdv5TT1TQ4fDJD1LbXE4EUCgMwLyaySGso06igFTw@mail.gmail.com>

On Tue, 2019-12-03 at 06:16 +0100, Sebastian Gniazdowski wrote:
> On Mon, 2 Dec 2019 at 01:46, Sebastian Gniazdowski
> <sgniazdowski@gmail.com> wrote:
> > 
> > 
> > On that occasion, isn't this a bug?:
> > 
> > ❯ str="ab##c#d"; print ${(S)str##\#}
> > ab#c#d
> > ❯ str="ab##c#d"; print ${(S)str##\##}
> > ab##c#d
> > 
> > Why no match at all in the second case?
> Any update on this? It would be good that the rarely-used flags are reliable.

You've got an expression which can match an empty string which you're
also telling to match a substring so it can match an empty string
anywhere.  The order in which it tries to match will be crucial so this
is not a useful thing to attempt.  What are you actually trying to do?


  reply index

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-02  0:31 Sebastian Gniazdowski
2019-12-02  0:46 ` Sebastian Gniazdowski
2019-12-03  5:16   ` Sebastian Gniazdowski
2019-12-03  9:42     ` Peter Stephenson [this message]
2019-12-03 14:45       ` Sebastian Gniazdowski
2019-12-03 10:39   ` Oliver Kiddle

Reply instructions:

You may reply publically 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:

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

  git send-email \
    --in-reply-to=1575366176.5200.3.camel@samsung.com \
    --to=p.stephenson@samsung.com \
    --cc=zsh-workers@zsh.org \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link


Archives are clonable: git clone --mirror http://inbox.vuxu.org/zsh-workers

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git