Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: ${(S)%%*} doesn't match the empty string (was: Re: [PATCH] zshexpn: Expand documentation of (S) (was: Re: [Bug] S-flag imposes non-greedy match where it shouldn't))
- X-seq: zsh-workers 45167
- From: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
- To: Roman Perepelitsa <roman.perepelitsa@xxxxxxxxx>
- Subject: Re: ${(S)%%*} doesn't match the empty string (was: Re: [PATCH] zshexpn: Expand documentation of (S) (was: Re: [Bug] S-flag imposes non-greedy match where it shouldn't))
- Date: Mon, 30 Dec 2019 23:11:05 +0100
- Cc: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>, Zsh hackers list <zsh-workers@xxxxxxx>
- In-reply-to: <CAN=4vMphok1Xp8wit4i=2y3gGvxSYTkyQEsYVQOXmw1aXyxXYw@mail.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CAKc7PVDx6WEFcZFS3TQ6+rF1YpA3jkD5sWwr0LCNE_c5MYkxVg@mail.gmail.com> <20191228210017.2cdgwgpqrssrfhgp@tarpaulin.shahaf.local2> <CAKc7PVD7UCc5yqDays=xCVFa=-Ns6phhqLd2se_+3iKNzOr5tA@mail.gmail.com> <20191229020534.oqh5ri3nqealx4hj@tarpaulin.shahaf.local2> <CAKc7PVDhkOm9gQ-mxRnyh=MT_onqvsQAzymcpV+AguanHa7nig@mail.gmail.com> <20191230180036.u33ixxe5pjjk7lal@tarpaulin.shahaf.local2> <CAN=4vMor_OBci8FRDkQjM8GfpGuM2A58D=nN+WoDgpQrpRKBzg@mail.gmail.com> <CAKc7PVAXLpKqZvmbazZK=mvcz8T-AHJXKusut6aEjkkSLzgdbw@mail.gmail.com> <CAN=4vMqyNngcWKH7TfN14Rh+5vyDJ-v8ciNiF7OHrNQG=OLvDA@mail.gmail.com> <CAKc7PVA-G9J1sAYdEJ-6GtqQnTx3RyJP6x-jM3JEYqX6NV3Gpg@mail.gmail.com> <20191230212420.gk2jkimlk3epfdha@tarpaulin.shahaf.local2> <CAN=4vMphok1Xp8wit4i=2y3gGvxSYTkyQEsYVQOXmw1aXyxXYw@mail.gmail.com>
On Mon, 30 Dec 2019 at 22:46, Roman Perepelitsa
<roman.perepelitsa@xxxxxxxxx> wrote:
>
> On Mon, Dec 30, 2019 at 10:25 PM Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> wrote:
> > > Also, ${str%*} doesn't expand to $str,
> >
> > It does for me; see above.
>
> I believe Sebastian is correct in that ${str%*} used to chop off the
> last character from str. It's been fixed at some point. Perhaps
> ${(S)str%%*} was supposed to get fixed at the same time but somehow
> eluded it?
Yes, running the latest zsh reveals it has been fixed (I was running a
few commits behind HEAD).
--
Sebastian Gniazdowski
News: https://twitter.com/ZdharmaI
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin
Blog: http://zdharma.org
Messages sorted by:
Reverse Date,
Date,
Thread,
Author