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=DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,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 10ac4b8d for ; Sun, 29 Dec 2019 00:57:08 +0000 (UTC) Received: (qmail 12460 invoked by alias); 29 Dec 2019 00:57:00 -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: 45153 Received: (qmail 16467 invoked by uid 1010); 29 Dec 2019 00:57:00 -0000 X-Qmail-Scanner-Diagnostics: from mail-vk1-f170.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.221.170):SA:0(-2.0/5.0):. Processed in 1.977191 secs); 29 Dec 2019 00:57:00 -0000 X-Envelope-From: sgniazdowski@gmail.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.221.170 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; bh=BXlR7fsi55c+Ap2j9MiY/hxUntiTj6B5Sp21F/r8jao=; b=KjVbrPniSnp6CVsGAZ5s7SFinFXKX3mk/OsezUzLNvJv78pVZvr1n02xa6+nEEH6qr 9OK57wLz/IYHx0sgRZVxvd6Ry/AI6vz0Sx2f0b2PpLyhAfG4OqldmqODdvrVUVWhWTqx 1egoaThpZdtI17hKDRun3NC16KP2Ggvalbc9CorMKfZcR3IfjXfOWLOGBre3OohYmZiK 1gFJHmgrixzD7murZfSZlW1RWSWPb9Yg/zUi4ue4YRydmA11M+a2AiAMWy3B+LtAMH8T boKhqxP2VypcykiptAkfC0+PrguAO5BtNz/WwL/Yo5JuXLCHGEPRbtBFC0cFPa6u4dur nGfA== X-Gm-Message-State: APjAAAUfuGG/sxyXyZE/tm9R6YwFAXjXTRYhjw3Rm9FAeZys1psiafc+ 99Emmv90xwg2mDZTd3VGczCb0qsekeyFLINNevrJIQ== X-Google-Smtp-Source: APXvYqz+71D6meRVRFqBHEToE8qhZWMEPkrRMf53Wd4Z//8uYMmNIH4OIpOZbD6F6jDgSMwBgqIkIBN6MSZQLSWIKY8= X-Received: by 2002:a1f:1144:: with SMTP id 65mr33992041vkr.77.1577580984142; Sat, 28 Dec 2019 16:56:24 -0800 (PST) MIME-Version: 1.0 References: <1a130b2e-5824-4b7a-8510-2b1d0b3fdac5@www.fastmail.com> <20191227052923.yal2nnmxdxfgvfkr@tarpaulin.shahaf.local2> <20191228210017.2cdgwgpqrssrfhgp@tarpaulin.shahaf.local2> In-Reply-To: <20191228210017.2cdgwgpqrssrfhgp@tarpaulin.shahaf.local2> From: Sebastian Gniazdowski Date: Sun, 29 Dec 2019 01:56:12 +0100 Message-ID: Subject: Re: [Bug] S-flag imposes non-greedy match where it shouldn't To: Daniel Shahaf Cc: Zsh hackers list Content-Type: multipart/alternative; boundary="0000000000002a120f059acd3274" --0000000000002a120f059acd3274 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable sob., 28 gru 2019, 22:01 u=C5=BCytkownik Daniel Shahaf napisa=C5=82: > Sebastian Gniazdowski wrote on Sat, Dec 28, 2019 at 20:04:21 +0100: > > I think that many examples in the man pages are like that =E2=80=93 the= y don't > > go the obvious path of just demonstrating the usage but instead, they > > cover some edge case that, after (sometimes quite long) thinking > > reveal something very peculiar about the feature. > > So what? We're not going to accept a patch that adds an unclear > explanation > simply because other explanations are unclear. > I think that the style of the docs has a value. At first one can get little angry "why the example just doesn't confirm what I already suspect", however, after untangling it one most probably will feel satisfaction and gratefulness. It's a way to share advanced, expert knowledge. You can't actually get rid of the variable $foo; it's needed for the =C2=AB= print=C2=BB > call on the next line. Just noticing that this shows another non-trivial aspect of the example - that it uses mbegin and mend instead of match. Otherwise, I agree. I'll go ahead and make the change, > and also change the spaces to underscores. Thanks for pointing this out. > Do > you know any other examples that have room for improvement? > As I said I see much value in the current style of the docs and I've learned much from it, so I don't think it should be changed. --=20 Best regards, Sebastian Gniazdowski --0000000000002a120f059acd3274--