From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 12461 invoked from network); 30 Apr 2021 20:44:15 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 30 Apr 2021 20:44:15 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1619815455; b=sY1E2kIgU+RR3KAF80vG5THAggeoAhTQd23aQhIkWnaxoakUNfysXnB65pGKkxab30GW09IUo2 +nH3kjTO2urWPsidN9J7Qz5VTGwv7egWZHpPdXB53XuOIUAqwbSlQHdhns78Fi6HjVAtNi4NBE YGAfsTHFwfBMVw56n8jLHGDB/6viyNTmdDlPpThLlBGFIuHqyvSxwBrTVQ46zwIH+lFoABuHTk blAai2omQw8TTuVreuh11GWOJd8P7Oeh83lHJ7XXsAJV0fe/WTsS3XI11AKtkfD2p+KyL5ags3 HS8EKnfDc5mAs2FuSYE9h4uOrXTC+IVsRc61k5c+P8rWgw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-oi1-f176.google.com) smtp.remote-ip=209.85.167.176; dkim=pass header.d=brasslantern-com.20150623.gappssmtp.com header.s=20150623 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1619815455; bh=sCdr3rw8rJvnLGV28uECLf9Y428AsxgWxqN35k/x3Rg=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=d75n0L36inOUJ/aqeY1ATHiLmoIviM893HjDCJrqlBtZk4s8trSyASZVsxzkJjbZZE52GmqYuR Gdqnd8UWVmjfviBi5u7eWN5qh4144lhXTDyoX6BJElyYLlcylDRSu7zI5RpBu5Nm7QdOsHUs60 22J4OkvXY1y7CAF9n2WQ+JmILYcvA7oaixusKmjyXYZdbNdle1A6iO+3YxaJImygFbQ1vN4A1A SIGplrzTnXC6KtWFYQl/j5t3yofvUln0SSvF1qUHBQu73YAbj/WzpIeJC4/J/Mx/+fJBR5xJ24 ORA3IKxzYiEKyCTs7qZY7eNWKQL7md/2HjPsSbRL91Ciow==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Type:To:Subject:Message-ID: Date:From:In-Reply-To:References:MIME-Version:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=372Bl7D21Y6JLJz9fELdHly8y6q2ox2uLsaJejfhFQ8=; b=j5JCZVZm4vFpyUKZwDTBqaPGuz RRtCSfBxrbgbySrF7rS46PRdt1nwxpYtEiSwy9I46eFZ6Y/GiFsIL+2UhBwmEMvoPaXMthWeKlGr3 CExOesty5Cau3qlCtDO5LL7GJlRNBTEokQDTn5z+TpM5mcQLnsqfDK+XcXmxFux67X9vyINMPfh20 9jY9twJCjSvY3QtKR2aWjobj4ZaY8gJuKqNTLgMAbcb4RTSZ8jgVDXXEYpjvCVQ2Q+k/GVlbt8O3s 4Pa4bDdBKZh6sP9FEug34qM5NbAmp0IJ3509V3WSwCd0Su5epmdmUxlpcm7NcCju4nvFoVfxjcJ3v 49yQQZtA==; Received: from authenticated user by zero.zsh.org with local id 1lcZzi-00091p-6f; Fri, 30 Apr 2021 20:44:14 +0000 Authentication-Results: zsh.org; iprev=pass (mail-oi1-f176.google.com) smtp.remote-ip=209.85.167.176; dkim=pass header.d=brasslantern-com.20150623.gappssmtp.com header.s=20150623 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-oi1-f176.google.com ([209.85.167.176]:47029) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1lcZzU-0008nv-JB; Fri, 30 Apr 2021 20:44:01 +0000 Received: by mail-oi1-f176.google.com with SMTP id m13so71232214oiw.13 for ; Fri, 30 Apr 2021 13:44:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=372Bl7D21Y6JLJz9fELdHly8y6q2ox2uLsaJejfhFQ8=; b=Nhu/uzPrTBAgBUrZLie8RFMljTxjyG/8ZhYlLlEO4fuueyU+7dsGbVsFwWNr7hRe/J 1Yl0Zfp029PsUXQsZhmyl+JytX7oSpClb6r6/Y89BDa6osFZBif4R5rrxbpYThkVdXIL 11PsMk9SHLtZBLhgHcb1V0KlxxqODo/FxaDVrFvRW+w5jcyOTT1DiJJY7ZpvOu8qMt35 1rMUT0zgsBOSAU6nWLmKb3MYGn+kly/cnix6berG0COLzqH6Kal8lFQiSpQxbIBXIowT SqByePNQG/yc1urxSFDnANA54s+ZYmBhIKQJ47Lh+H5Y5Z4aKsdjEM7uwJ0PM5YCgEpv iBQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=372Bl7D21Y6JLJz9fELdHly8y6q2ox2uLsaJejfhFQ8=; b=O0uLlaFiy2ygfAOW6P0fzhyMfVrs7bzch9VCEGP5vf1/rs0zNTYlr8coDtnPZaKkJy 4b67soDA/2WSD6lE0nOngToK5hzCI/krL8oQLruobMmNlv1gtjSZ16t7rNa8oGrsbf7Z F0yfmNk9rATt/1L3X1DR/z97mTea8NBvBElzulYx81xoTd1389Qe7APzcoDi9xUVR45r jbH9hEWepsLNmoaL9kGCbkb/Lt92qBbTAq5ol8Xe1X1IXbISNofYdv5H4WDwWk+jsCsm lWGfyze+3lC/kfjOKkEXFNKU2ktqPoGQUGZJlKSHVuwYktG878qL7p4mdVvdI4e2MRV8 RxdA== X-Gm-Message-State: AOAM5310l6nFeHtZ/HsAzM+CdFphVCz1JG1QtE29UjzK0V19p7fowZkm rsb174/SAH6nNgZS3/L/Vf+BGR8QTeIDf0xJUjzhig== X-Google-Smtp-Source: ABdhPJy7hebM0AKAhwtevrCSuEmuysECuH8RT2WNeCq2AywM541BxhxJ1xdnl6TWHw6iJLJaXJN865KQ316+BDTiWsc= X-Received: by 2002:a05:6808:51:: with SMTP id v17mr12193378oic.132.1619815439593; Fri, 30 Apr 2021 13:43:59 -0700 (PDT) MIME-Version: 1.0 References: <20210430065123.zjq2mpanmtbkkgfl@chazelas.org> In-Reply-To: <20210430065123.zjq2mpanmtbkkgfl@chazelas.org> From: Bart Schaefer Date: Fri, 30 Apr 2021 13:43:47 -0700 Message-ID: Subject: Re: Bug in Functions/Misc/regexp-replace To: Jacob Menke , Zsh hackers list Content-Type: text/plain; charset="UTF-8" X-Seq: 48758 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: On Thu, Apr 29, 2021 at 11:51 PM Stephane Chazelas 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).