From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19463 invoked by alias); 31 Mar 2017 21:14:13 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 22644 Received: (qmail 17898 invoked from network); 31 Mar 2017 21:14:12 -0000 X-Qmail-Scanner-Diagnostics: from mail-ua0-f176.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(209.85.217.176):SA:0(-2.8/5.0):. Processed in 1.485898 secs); 31 Mar 2017 21:14:12 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_PASS,T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 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.217.176 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version; bh=Oycw9IcdCNuH/05SXUf3fgTmFzWwrjdebOIFroCH79Q=; b=ieIjRHOk9ul08Pz/+skdesGi0LY0XygQWQDytK8ocrVORDlot552lQqanBgLmWZP6c TtuBmTrfqlIYY5RAeRavZD74AZDP/B75XzWQ1Ntw9aNEazkk0ASYEdkjQc6rLK6ezsdi SFs80si0jRJEP1no+YK5ze462q5qVfH4zH/FNun70ELRX7eeSM56NenlZVve5cnvGBnJ CnOp/P5M4hE0jLAYh6Z96nblOrGzW42zGqxQU0blZ/F/vRgMHDsE1jYtfcr2W2UbTorl m3nDQxBdCbdoPkh9wYMBLJVzKecCEb9GcYIQDRioKAZlUpCZdEUlvp09ABjMzWGrLqoK HWEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version; bh=Oycw9IcdCNuH/05SXUf3fgTmFzWwrjdebOIFroCH79Q=; b=Zo+SrZHIgI9+NqjhLdmHXg1EhYMZ2TBbJeBEbzHKZv0RgqMVmPzHzcWbYKZOHhnzd/ V+mQhdJ6B4BtQg5UY0XFVwgIv58n9Kmk00yEuyFPKGESZfVUpSLffgwc1RH+b7umgK+l 2Ada0BR05/SraLIiLDQbzq2Wr/tWNfuvGbPrrxcmblQZkv/TU3vDmjyHm4ADD/k6StTJ UNflENMpfAzyVqoCCz4OJS7e0Kg8MGOSxAWIFspC2WsbXIXfAiuGhZrTOlKAdv23zJoB bU37O3olaxHqVNBK3FKCC9HvBcnJZ5gFCUmHKiIhSuzucxM3ybkjRXkXiBKnVeXBHDBs hgIA== X-Gm-Message-State: AFeK/H2waBgTXSii0kfE+RyNZMSbR4x6l8mS4csLrAvXadcqx2cJfT2tbcwkgVCj356EFQ== X-Received: by 10.176.81.218 with SMTP id h26mr2283368uaa.7.1490994841137; Fri, 31 Mar 2017 14:14:01 -0700 (PDT) From: Bart Schaefer Message-Id: <170331141359.ZM24862@torch.brasslantern.com> Date: Fri, 31 Mar 2017 14:13:59 -0700 In-Reply-To: Comments: In reply to Sebastian Gniazdowski "Re: zregexparse" (Mar 31, 8:58am) References: <170330221929.ZM18456@torch.brasslantern.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-users@zsh.org Subject: Re: zregexparse MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Mar 31, 8:58am, Sebastian Gniazdowski wrote: } Subject: Re: zregexparse } } PS. I've examined if zregexparse could be use to fill } region_highlight, and it seems it can't: } } zregexparse p1 p2 abc \( '/bc|?/' '{print "$p1, $p2, $mbegin[1], $mend[1], $match[1]"}' \) \# } 1, 1, 1, 1, a } 3, 3, 1, 2, bc The return values from zregexparse are pretty strongly tailored to be used with compset and compadd, and it does nothing useful with $match and friends -- it's not tied into glob pattern referencing at all. The values stored in $p1 and $p2 here are intended to calculate offsets into "abc" for a call to compset -p, which isn't going to help you with ranges for highlighting. Also (though not significant in this eample), zregexparse expects words joined with $'\0'.