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 45166
- From: Roman Perepelitsa <roman.perepelitsa@xxxxxxxxx>
- To: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- 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 22:44:59 +0100
- Cc: Zsh hackers list <zsh-workers@xxxxxxx>
- In-reply-to: <20191230212420.gk2jkimlk3epfdha@tarpaulin.shahaf.local2>
- 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>
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?
Roman.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author