From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14978 invoked by alias); 2 Nov 2016 06:53:35 -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: 22072 Received: (qmail 29183 invoked from network); 2 Nov 2016 06:53:35 -0000 X-Qmail-Scanner-Diagnostics: from new2-smtp.messagingengine.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(66.111.4.224):SA:0(0.0/5.0):. Processed in 0.3316 secs); 02 Nov 2016 06:53:35 -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=0.0 required=5.0 tests=FREEMAIL_FROM,SPF_PASS, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: psprint@fastmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at spf.messagingengine.com designates 66.111.4.224 as permitted sender) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.com; h= x-me-sender:message-id:from:to:mime-version :content-transfer-encoding:content-type:references:subject:date :in-reply-to; s=mesmtp; bh=OVp3YgNC1bCy+4c3pyg5oUpiHnQ=; b=SZPIH bxexIelctc3bcF4PcVduu5lkygVpC76cC9dKfBFrYe3SXG4sBT056MHoCz8Mh0TP S2j6Kwdi8AqXmZNAYSjdg74GI8QtDoNudXCF8SFDTbbJZlJGhJpnim0q89Z/3DZY 83xFtAjgeOMk6yHvU0sfC4hVQ8xoq3Izb8TkGY= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=x-me-sender:message-id:from:to :mime-version:content-transfer-encoding:content-type:references :subject:date:in-reply-to; s=smtpout; bh=OVp3YgNC1bCy+4c3pyg5oUp iHnQ=; b=s44wG/WJi5AnqPjXnrhoDzt2e7aJLINC5hMELu1qqQ1JCK9DAI/tYj7 M755EQWMs1ytcVpuWLv6fkg2AZTuu8jqKVvLAu5awKqxCFEpLyYlx8fUZVlOWLJv cDIPvi2Vk92Eykho6mWSJPJY5oJlbHz7g+Rs6skCuIoeE6WC6ghg= X-ME-Sender: Message-Id: <1478069609.99952.774686337.5CA69ECB@webmail.messagingengine.com> From: Sebastian Gniazdowski To: Bart Schaefer , zsh-users@zsh.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain X-Mailer: MessagingEngine.com Webmail Interface - ajax-037c6db9 References: <1478010333.3056500.773811025.1AAA4FEC@webmail.messagingengine.com> <1478017673.3085741.773974873.7C58DD0B@webmail.messagingengine.com> <1478024975.3113621.774078481.323B1F9E@webmail.messagingengine.com> <161101142301.ZM25643@torch.brasslantern.com> Subject: Re: Match to the end of string when using (S) flag Date: Tue, 01 Nov 2016 23:53:29 -0700 In-Reply-To: <161101142301.ZM25643@torch.brasslantern.com> On Tue, Nov 1, 2016, at 02:23 PM, Bart Schaefer wrote: > You can do this with just a counter, you don't need a math function: > > i=$#region_highlight > : ${text//(#mi)(${~colsearch_pattern})/ > ${region_highlight[++i]=$((offset + MBEGIN))} > ${region_highlight[++i]=$((offset + MEND))} > ${region_highlight[++i]=${__hsmw_hl_color}}} Couldn't get this to work, although $i before and after differs much, however looked at contents and there are lines like: 193 -1 none -1 -1 none -1 -1 bg=17 -1 -1 none so something doesn't append well. > I have to give you credit for coming up with the idea of using a text > replacement in the first place. I had to re-read your first message > on this thread about four times before I understood what it meant. Well it comes directly from zsh-users/Zaw, I've even added Zaw license to the project because of that single line, now I dropped it. -- Sebastian Gniazdowski psprint@fastmail.com