zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Jacob Menke <linux.dev25@gmail.com>,
	Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: Bug in Functions/Misc/regexp-replace
Date: Fri, 30 Apr 2021 13:43:47 -0700	[thread overview]
Message-ID: <CAH+w=7Zi5Huei1goPTo4LxkWUZH+nzq6VTQfpHO-4Mf5-pmWrQ@mail.gmail.com> (raw)
In-Reply-To: <20210430065123.zjq2mpanmtbkkgfl@chazelas.org>

On Thu, Apr 29, 2021 at 11:51 PM Stephane Chazelas
<stephane@chazelas.org> wrote:
>
> One might argue there's a problem with the (q) parameter
> expansion flag, it escapes leading =s but not the =s that follow
> : even though they're special there in assignments.

Arguably (q) should either quote all =s or none of them.  It has no
idea what appears outside the parameter reference, that is, there's no
reason for it to treat a leading = as being the start of a word in the
surrounding context (or to believe the context is assignment).  I
can't think of any situation where I've depended upon the
quotes-leading-equal behavior.

On the other hand the check for a leading equal means that (q-) would
work here (and is frequently better than just (q) for other reasons).


      parent reply	other threads:[~2021-04-30 20:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-29 23:53 Jacob Menke
2021-04-30  0:40 ` Matthew Martin
2021-04-30  5:56   ` Stephane Chazelas
2021-04-30  6:51 ` Stephane Chazelas
2021-04-30  8:17   ` tilde expansion after quoted : in assignments Stephane Chazelas
2021-04-30 17:43     ` Bart Schaefer
2021-04-30 20:13   ` Bug in Functions/Misc/regexp-replace Jacob Menke
2021-04-30 21:22     ` Bart Schaefer
2021-04-30 20:43   ` Bart Schaefer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAH+w=7Zi5Huei1goPTo4LxkWUZH+nzq6VTQfpHO-4Mf5-pmWrQ@mail.gmail.com' \
    --to=schaefer@brasslantern.com \
    --cc=linux.dev25@gmail.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).