Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH v3] regexp-replace and ^, word boundary or look-behind operators (and more).
- X-seq: zsh-workers 48971
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>, Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: [PATCH v3] regexp-replace and ^, word boundary or look-behind operators (and more).
- Date: Mon, 31 May 2021 11:18:11 -0700
- Archived-at: <https://zsh.org/workers/48971>
- In-reply-to: <20210505114521.bemoiekpophssbug@chazelas.org>
- List-id: <zsh-workers.zsh.org>
- References: <20191216211013.6opkv5sy4wvp3yn2@chaz.gmail.com> <20191216212706.i3xvf6hn5h3jwkjh@chaz.gmail.com> <20191217073846.4usg2hnsk66bhqvl@chaz.gmail.com> <20191217111113.z242f4g6sx7xdwru@chaz.gmail.com> <2ea6feb3-a686-4d83-ab27-6a582424487c@www.fastmail.com> <20200101140343.qwfx2xaojumuds3d@chaz.gmail.com> <20210430061117.buyhdhky5crqjrf2@chazelas.org> <CAH+w=7bHxSbFr60ZU0+oZ6+qEejhfBYTzvL7=aXadY5XzWtSzw@mail.gmail.com> <20210505114521.bemoiekpophssbug@chazelas.org>
On Wed, May 5, 2021 at 4:45 AM Stephane Chazelas <stephane@xxxxxxxxxxxx> wrote:
>
> > What do you think about replacing the final eval with typeset -g, as
> > mentioned in workers/48760 ?
>
> [...] very legible. It has the benefit (or inconvenience
> depending on PoV) of returning an error if the lvalue is not a
> scalar. It reports an error (and exits the shell process) upon
> incorrect lvalues (except ones such as "var=foo"). A major
> drawback though is that if chokes on lvalue='array[n=1]' or
> lvalue='assoc[keywith=characters]'
Hmm, I wonder if that should be considered a bug. It seems the
parsing in builtin.c:getasg() is not equivalent to what's done for the
same input syntax elsewhere.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author