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 autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 2166 invoked from network); 14 Nov 2022 20:01:05 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 14 Nov 2022 20:01:05 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1668456065; b=l1lI1n9PXlZOi04b1jSm6AMsYPnjcf3KVt+F4/N+biFEJIc6uCm269kznsQmC6ykLVt1hOqNO1 /3L+rEFtAgeilst8gfypW0rkzfgmr+KrNT3oo33hO5hsFa7/3dgl1ti4zbLVpSc0NK7nNuFACz 6hjsveBIXeeK9v39VlwTEx091RCIGbF6BM38evj0vvpYP8djblzBNSGVMmTQ8AbWVbTe/JCyU6 KNXYxagta7KYWTBH1H2osBc2ha3nKJNQs90B6QSplW3JGU96RCKRRiSVKawVFufwgYGBF/P9Ns HFFskXnySV76lbih5cdIAzF6Hga23+Fp5GPtG225wZEgVw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ed1-f46.google.com) smtp.remote-ip=209.85.208.46; dkim=pass header.d=brasslantern-com.20210112.gappssmtp.com header.s=20210112 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-20210803; t=1668456065; bh=f6dSji5HytdAP0e2Vn85LUgddMgDm+Q5kEnpKZ4/U4M=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=QrLUnZTigV6m//qtbYUPNtQSeWKzKpiyShHqqDj7802szltUXYpv6m6nuK/P2RKia7pUJqaQ5T h7VnZkUIbkSnd0JD9qnDiiSByQCFcx5nsk7n6PYOyzr6Oc6Rc8gckthdhUlwy6w4VvB4k/qbY7 q/bVarSX7cDiBwO3SLPNZs/kkKdHVYmiDQquCj/W3csZcqRQnxeiJ/EOm+DqghHWWVlsOzQXHo wHwGo52hKpmj+bYdnBYQLBef6saguwrLko0GsyQ4RO5DbWY3Fp9rQEjKB716NLP9FxSu67Zrcf tIUuxn+GPlB9A3dorDrCSrcRnW4EpkjIKU0pHETuxr1BCw==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID :Date:From:In-Reply-To:References:MIME-Version:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=Kk0Bj016ybnD68BBcUyEVUaLcnUiJy0ZBwTnSdvhROQ=; b=KMKkZ1s32uFWGwrdwXEZgZGNqb BZpEpcstSUD0SaySKiiN3U/v9PoRC5aQGUWpa5FnUM59Sf6qUQ35PHF7++O439DHRWYbMVIHtuO6F ClrG/kCac7r/+zIMrepFW0UxZdLibQ+VGg9FpiYurYLG5sc7c7d5oThJ2nqEbHv9fWi2UldTBOAxW hrEI8KbPjvIPV4exoYIi7wWmVsKfkPgqpF5Y+/A6RfnGRuQgmOYjqXPzQHh5WnVEdjIZtr+bUg84r uFBqWVVIQb4nQEfdtCWiZft/T+iDFMsyCS+MxPJNfoKuLj2rc/9g4LlP04uO4HsPscoUUmHtEbHLJ AUYmr5wg==; Received: by zero.zsh.org with local id 1oufdg-000DTM-SQ; Mon, 14 Nov 2022 20:01:04 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ed1-f46.google.com) smtp.remote-ip=209.85.208.46; dkim=pass header.d=brasslantern-com.20210112.gappssmtp.com header.s=20210112 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-ed1-f46.google.com ([209.85.208.46]:41756) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1oufcv-000Clk-7Q; Mon, 14 Nov 2022 20:00:18 +0000 Received: by mail-ed1-f46.google.com with SMTP id v17so18886382edc.8 for ; Mon, 14 Nov 2022 12:00:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20210112.gappssmtp.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Kk0Bj016ybnD68BBcUyEVUaLcnUiJy0ZBwTnSdvhROQ=; b=3Rofk5s+O0SDpyDqgjz1ytZ80ej8mx639BTTsW6lvdoo/y31TZjvEIq9KRSV0YRHa6 bFkAVDOWReh9k4H2YjODOvoHNouPQgAxQCwViQSjI0nhn3XqAwiN6MSJdVJs0D+m/J9U CiF5o3+6PfQod6KbjaWJ9Mllw1L1oxGxq72eyLjrK8QpUjyqTM4v3O/Bn03E+fj4CRog TrDb0wIcguUseXm9X3MYMEUzunGIvmq+geMaJ09BRVR/JkqYyAxQOBmid7/RzK12DdGr Oh6MXoW3OnpaLlYHzpDaKlyydO2fvXl3EXjOVE7p7jnPV0x6stM+ehOf08WxW93bUEVK 9iug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Kk0Bj016ybnD68BBcUyEVUaLcnUiJy0ZBwTnSdvhROQ=; b=IVwfk7H4DA8XQ0ABoZgX8g+ceSIaRpRMdPEfeCNDZu/Gkl3LAYWw7PhauETnS40uZb zE3m09JjZkmnndd+Hi2suq8kE1xSFIK//j85rBK63B0a5/AmuHiGCL7s1f5IPGLsygCc zj8Dl6a1bCGd0m7IxzCdyR8dwgZBqIcnKM7R2WYPetirzLCjcPVc7pusdwFxzF1T7If+ HZhpdZ9t08X9wRPJSKKVU1cT5k1PEH4TaeHavumYie6qcwXH7r6za2JOYz24KjfkZyRL i3Qksx/mi7BzFKvEQEEAzAKV46jPGlExX0WBnF+f1NHCNwxuOgU0IA5A11nEQU5kq0an 7rsw== X-Gm-Message-State: ANoB5pk4PIvnrr92rdalpALAth2W+NUQsfRO0Uyybs/KlEGIBxZOw3DF M9hMwnVJ8Diy3uxyHNcmB3fvx89IPW4PVG587bOB9Q== X-Google-Smtp-Source: AA0mqf41ns7EotPssJ8/ldFV9rzI+iohQpKfm1VzjAJm7ksIt5VWzNbETNqF0Wd8kQuGe36o9Q/+PpVLKt46BkAO344= X-Received: by 2002:aa7:db85:0:b0:463:f3a:32ce with SMTP id u5-20020aa7db85000000b004630f3a32cemr12559061edt.366.1668456015800; Mon, 14 Nov 2022 12:00:15 -0800 (PST) MIME-Version: 1.0 References: <6d7ba212-be9d-6bb4-f5ce-9a796032ade0@eastlink.ca> <6a92000c-dee5-a1e3-a77f-6a4697a66ab1@eastlink.ca> <34a949c4-0853-4c65-d2ad-db40749dff81@eastlink.ca> <2dd50dc8-cdbc-02e0-0e1e-485718732d0d@eastlink.ca> <3a10f310-3ee8-d3b4-f6db-7fdb18b81b1f@eastlink.ca> <77692192-70b3-8a6a-fd01-d5f8b37f59b2@eastlink.ca> In-Reply-To: From: Bart Schaefer Date: Mon, 14 Nov 2022 12:00:04 -0800 Message-ID: Subject: Re: coloring substitution seems to eat next line. To: Ray Andrews Cc: zsh-users@zsh.org Content-Type: text/plain; charset="UTF-8" X-Seq: 28386 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: On Mon, Nov 14, 2022 at 10:58 AM Ray Andrews wrote: > > >> now I just need to understand the '#%' anchors > > I think I might: Because it's a negation, you have to force the match > to include the entire element from beginning to end. You're sorta > forcing a greedy match. Yes, it forces a match of the entire string. No, that's not the same as "greedy". Given a pattern like "#%(*)foo(*)" and a string like "xxxfooyyyfoozzz", a "greedy" match would have the first (*) match "xxxfooyyy". A non-greedy match would have the second (*) match "yyyfoozzz" because the non-greedy first (*) matched only "xxx" before "foo". This isn't particularly important in the context here, but if you were using (#b) to activate backreferences it could be crucial.