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))



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