From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id ffa4e5fc for ; Sat, 28 Dec 2019 20:35:52 +0000 (UTC) Received: (qmail 18849 invoked by alias); 28 Dec 2019 20:35:45 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 45151 Received: (qmail 20040 invoked by uid 1010); 28 Dec 2019 20:35:45 -0000 X-Qmail-Scanner-Diagnostics: from mail-lj1-f171.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.1/25670. spamassassin: 3.4.2. Clear:RC:0(209.85.208.171):SA:0(-1.9/5.0):. Processed in 2.159401 secs); 28 Dec 2019 20:35:45 -0000 X-Envelope-From: schaefer@brasslantern.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.208.171 as permitted sender) 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:cc:content-transfer-encoding; bh=XGINyVhkzbVxW9V59LL8+/C1tZ/Pd0S4WWK4bGrior4=; b=t+Y8jmVMrUZ0c9AGRc3EyEnNlL+l34HeOnNv9zUS85OAroHejq+c1PZZ6Wdy4d1xcR OgORQ+u5hXrUQHr1n32q2Kp08n6FW0U3+g7jhJwTmsUjZbL7cLZD8oI4H2taX4j/fOxE seiNMkF7FFhUnMd3Wc934ws1RuSAzyMSZg/3UivcWJwtJ/yjQf459Xg8s5f1NkbVJKSy dYFYhfzGd57vO9iKiYxbK0CoJxCw3T8InFC5ZKedRY130Fxp3bIxk3dz3ka1PMrfHm6C McqyIy0K5+wgY/kvb5cLOmTt1blZIgkdTlP+wEpXo2m3XFC0UZDHhyF4FtdhWcH4D85O UfOA== X-Gm-Message-State: APjAAAUCQ5WOgtZiSE1kiWO/SFCe4b/IcBZG5H0R0NdLdpnsN02xQ7Rh GFevG0iCna5KSor3X1F44IKC+ZsG67jlxqQ0kntSEg== X-Google-Smtp-Source: APXvYqwTILEo345/ytuqA+qBjuUany3L0uasrnBoOEUq2f7rSrey9PHKZb2puJ6FBYH5DqKZR81atYjpO96lZl4niOw= X-Received: by 2002:a2e:96c6:: with SMTP id d6mr1984675ljj.4.1577565307720; Sat, 28 Dec 2019 12:35:07 -0800 (PST) MIME-Version: 1.0 References: <1a130b2e-5824-4b7a-8510-2b1d0b3fdac5@www.fastmail.com> <20191227052923.yal2nnmxdxfgvfkr@tarpaulin.shahaf.local2> In-Reply-To: From: Bart Schaefer Date: Sat, 28 Dec 2019 12:34:56 -0800 Message-ID: Subject: Re: [Bug] S-flag imposes non-greedy match where it shouldn't To: Sebastian Gniazdowski Cc: Daniel Shahaf , Zsh hackers list Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, Dec 28, 2019 at 11:05 AM Sebastian Gniazdowski wrote: > > I think that many examples in the man pages are like that =E2=80=93 they = don't > go the obvious path of just demonstrating the usage but instead, they > cover some edge case Usually the examples in the manual page are derived from some usage in a completion function or the like, or from a "how do you accomplish X?" question on one of the mailing lists that led to the addition of the feature in question. Consequently they tend to have been drawn from unusual situations and never updated once a more obvious/common usage develops. > > > +if not the tt([^X]) part, as despite the tt(%%) specifies a greedy > > > +match, the substring matching works by trying matches from right to > > > +left and stops at a first valid match. > > > > There are some grammatical errors here (e.g., s/(?<=3Dspecif)ies/ying/) > > I think that grammar is correct here. Did you maybe misread the sentence? In American English it would be more common to say "despite X specifying Y" or "despite that X specifies Y" -- it's not exactly wrong to omit the word "that" but it's unusual. Sometimes one would even go so far as "despite the fact that X specifies Y". In the first case "despite" modifies "specifying", in the second case "despite" modifies the entire condition "X specifies Y" and "that" is needed to distinguish that "despite" isn't directly modifying "X" (exactly the way I put "that" after "distinguish" in this sentence).