Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: a='foo"'; echo ${a/foo"/"bar} outputs bar
- X-seq: zsh-workers 52230
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: a='foo"'; echo ${a/foo"/"bar} outputs bar
- Date: Tue, 17 Oct 2023 09:44:44 -0700
- Archived-at: <https://zsh.org/workers/52230>
- In-reply-to: <CAH+w=7a-_V27oJyxa9ZVQof8217xUCNOXXwPARqNxh4tiyM-1g@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <20221211175001.u7dqfrnnzylsbjan@chazelas.org> <CAH+w=7ZZwEpA9Wekz5wEQgkoDT0SQ6ht2VkmYgAYtx6zqoNs9g@mail.gmail.com> <CAH+w=7aoQsn5BeiWG3+RmsgoUU0aQxsDCJX6=JOubbexPDxYzg@mail.gmail.com> <CAH+w=7a-_V27oJyxa9ZVQof8217xUCNOXXwPARqNxh4tiyM-1g@mail.gmail.com>
On Tue, Oct 3, 2023 at 9:20 PM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
>
> I had an idea here that seems to work: while reading single-quoted
> strings in gettokstr(), recognize when we're in a pattern and replace
> all / with \/. That only fixes '...' and $'...' at best, though.
>
> So, back to workers/51202, my original reply on this thread: handle
> double-quotes in paramsubst(), leaving single quotes to gettokstr().
Any comments on this? Worth pushing?
Messages sorted by:
Reverse Date,
Date,
Thread,
Author