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 29449 invoked from network); 30 Apr 2021 23:14:21 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 30 Apr 2021 23:14:21 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1619824461; b=HEyc3f9SqWlwSwdBdz3PWJbZuXet11IvqAtZ5cCq7jyYUFgp3ylc8b5MFW8KBNoi5BGw9waWYM eyx8pSYIyuSa2TjLyVHQ208IcwBy3F40Kf8w6CuhYEHMqQP2VAq23UykTKOf2l3ZUVCRYMQSR7 oW30xr/sM+BY6HOgMSndzEKYbheFK4lMlN74l0jUMA3zT+CgRC6e+3g8uU24y8eyALEl8m0/oc /klVNa1R5ZJg9csnWJRl8VJg9aaKFtpW0Z/Ok6oGu0sktBECN/PlWxrxbSaPBMT2JUEzj4WoPx OeUMrmajXR3hoQsOLxQ1d2ua4xnFZbuX98pbp6dG3tsguw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-oi1-f171.google.com) smtp.remote-ip=209.85.167.171; 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=1619824461; bh=+YSHR/oNGgy8eb9uzmyQGE9f/KlLd6Rt/TxbZNRccQU=; 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=af8/QxWf5xn2i3Dy5tZKHlUCSoqsTW1HmLnvXXvd5JiD/Q7FzuRGlUfRQ/gqNESJmBaQ9KStoR QeHPNeeUh3jOvV9B+ODkjhHzdt0hJDON1gYbbVLY8hbaFLuVNgt5sKQ7b0l1GIU7hiiDZO+SrW jL34QXA6C7njLFntlUScnx961H0tnn+xLd0cizbXNpFrZshAq+2RJu/pDmprUO35aXOihH60T+ /eSLpy8PlvSkMpMYCz1daV9IzMvf2Ulb7QFaPOlJbv90YZiwXcDtCtHO6vjjVu4cqSj102gnxr kLYO7txndU3BQw2TH1OEV6ldnzH8m7k5S2GidobszcIQ9A==; 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=wglOlSD0oSTgerTpJRoe9IcISFDVxDTnpeI/WeYuuFY=; b=ZquC3ievlagQkboHJlAjK0Akzq rZ8wBCczmhOAmaMAuRLe6LKRL3aT6LO5PBv44ATZpj349udfurMirM1v+Fwyc7VkRVNiEBG1qQXHf qyXU+yvBMYK5cVnNRmCzbCEfxhe1VNz8Gd6cRo0jo5POe3pIZuFKWzKZ/K3Sx8SdQWlsTwxto19iO LEmzLuPkDrpyS6KlbYEd3xTSDokmI3q2UQChqQ4odmxIUYDm2VWxuLf5LWobtCR8CivYFaaFwave/ YMKZACrML7MXncYke1uX9O8miwgF2Oz1FCkL404Y0maKNV9eA1qgotorMANWSWTmLJIX7K7Z4QXxF Ja+jNumQ==; Received: from authenticated user by zero.zsh.org with local id 1lccKz-000Ee2-7f; Fri, 30 Apr 2021 23:14:21 +0000 Authentication-Results: zsh.org; iprev=pass (mail-oi1-f171.google.com) smtp.remote-ip=209.85.167.171; 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-f171.google.com ([209.85.167.171]:34633) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1lccKQ-000EOo-QF; Fri, 30 Apr 2021 23:13:47 +0000 Received: by mail-oi1-f171.google.com with SMTP id l6so3153995oii.1 for ; Fri, 30 Apr 2021 16:13:46 -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=wglOlSD0oSTgerTpJRoe9IcISFDVxDTnpeI/WeYuuFY=; b=evQJmD/elcxs4kdZ0TvEC3Wel0Fx2lwNfiaUBvSd0ZBgC9UphIPP2uIsc0ITTlFJdF 2TDelrFUZ3Nne8AqZVgc5IJqEVW0BQzZhyh+6FZuMB0XtxkjgwPFKi7UM4KHEwPdVbPA 9pyd+513b1gYfpOKUsFg6C6gKRaQtClK8XXGF+AOk6lYq+hTf5VPQaEvi2jM3sa5WGFN chI2a+pMfXwrQCVLLDA/49dakPMer/GKAuP4ryvvxdJ8ccMERRkLdnWjIXeaUHtkSR82 VAwAoZuMzPJ1AvvcwVIWvM0KpuuOWajlXq470Q08i/Onq1RnvLZLclxSue8tUF8jO7UQ vN0Q== 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=wglOlSD0oSTgerTpJRoe9IcISFDVxDTnpeI/WeYuuFY=; b=Soady38oOcKrjuRy9CZdvxffBLcRWZH/r371cUASzUfwH/gTjZh4ZyO14ziEUPERGX sSpWnotOX15NGJ4or47KgHUDtf5Y+vGj2MwGRoZ3VSAYR7bd6LQafJGWb6tKw9vgbFFa hwxrodQHBj1ohx85Pgq0PUByZZB2Fz6NLq3m9crr0a+SwCwTy3ObS/857brPffbpfVly Zj4WyeJ2ZprDgK0Ajd12pbVQgR6EUWZ1ZXCeJ3RD3JwwXVb/DYkIT8/37d66RAEfDXx2 QowsjyWO1FsKTglZ0Y+lU6Vwt3zMEiw8JKv3n75Zpu72eWMHfITfXU9CkSOh2jzUz6Oo Ophw== X-Gm-Message-State: AOAM532K+lH/VtjmppwR4D+zOBs0OOq38zrkcSDy8CGKZPYvy5bIorJc hYyZjpGkBgf7rPlFMrLh7Eqvv730RXvgto7ZwdRyryqNzeIMLg== X-Google-Smtp-Source: ABdhPJxiQ2FRtgAPoMRIpe/SybfEI32u4N24yXGbD6NBvTS/WOXvcH7ZMuQ+zJt1X9EPCCnbp/NEq4896/YNqFz2KfI= X-Received: by 2002:aca:af82:: with SMTP id y124mr5684059oie.84.1619824425355; Fri, 30 Apr 2021 16:13:45 -0700 (PDT) MIME-Version: 1.0 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> In-Reply-To: <20210430061117.buyhdhky5crqjrf2@chazelas.org> From: Bart Schaefer Date: Fri, 30 Apr 2021 16:13:34 -0700 Message-ID: Subject: Re: [PATCH v2] regexp-replace and ^, word boundary or look-behind operators To: Zsh hackers list Content-Type: text/plain; charset="UTF-8" X-Seq: 48763 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:12 PM Stephane Chazelas wrote: > > ping. I went back and looked at the patch again. Tangential question: "pgrep" commonly refers to grepping the process list, and is linked to "pkill". I know "zpgrep" precedes this patch, but I'm wondering if we should rename it. More directly about regexp-replace: If $argv[4,-1] are going to be ignored/discarded, perhaps there should be a warning? (Another thing that predates the patch, I know) What do you think about replacing the final eval with typeset -g, as mentioned in workers/48760 ? I don't see any reason to doubt the accuracy of the implementation, so except possibly for that last question I think the patch could be applied and the other two items addressed elsewhere. Thoughts?