From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16376 invoked by alias); 4 Jun 2016 06:42:06 -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: X-Seq: 38598 Received: (qmail 28126 invoked from network); 4 Jun 2016 06:42:05 -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=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=uX5Lu5MZ3UkjPSOKoGz+HGaHBO3PqowMq8ZItfX5Iv4=; b=XP6nE68BNnxxBoH9mkFCIxHNvuKqtPiVSq3LQ3tzjREkvYR7iT0Gy/+AomSuRp+DA4 t+tq68WL2V4FPvsNiDjsu5f8Xd13LKgdZ0hEngqwQhRc/o+EMigKPybf+zvWY5wjktQd e1Zep3T6/ibadtmiXKHX5hWEIm/ut9KPdB2pFSrxVQeOKy7ZBqDkI62jpR3SQNzYKTp/ azabce3pNUoj/equayj9pJVXbZx0U/4EO++CoUrM6fh3+gP6ncZut8ySxnSzrqbeuQSd EHS+U0VRz0Y80WHvKy+P/RkcGam0T5jX3swwblHnH8Uu/O4fu6XNJKBXaAKFL97LZadw 9anw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=uX5Lu5MZ3UkjPSOKoGz+HGaHBO3PqowMq8ZItfX5Iv4=; b=g8pzvn9PlvEsgJjfYzy1QUIr4EDFZ9nlpDm3py2l8X2nauK3+N3F8TdxDvOBfWVFWX JmjEVSL8345xfp81ieIVi40L4MSP4IoSUCzMy/YhCMu5JlYqGZZw+PAQ6RKYRkPWUdmJ aOg0fgSMUUoaRRbB1CJhGP/7VLr2lfCK9rCg3N0W5qDu1POUj3kkZvhFunsd+oVHCfH4 QwA7m6LyDFtncpwhrmHUx04X3EOF+uvNXkKNwL6X3Wrrb7lnd+uBDh7EGC24HjCfXfe0 /U2RHogKTsKQUkPCYwMt7G1VdxGM7k9+K7+omV5y3qwRfI4gWNLjRm9zTSOWNd4rdOlj 0Oog== X-Gm-Message-State: ALyK8tLdeNqgszHrFLNi34qCD7av9iRCBG+2ssdK3CPkrbFFsE4YecE9tipAsVRpWwmEvR06H09mCGjSjI/2CQ== X-Received: by 10.55.99.216 with SMTP id x207mr6656050qkb.163.1465022523309; Fri, 03 Jun 2016 23:42:03 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <160603225821.ZM25900@torch.brasslantern.com> References: <160602151123.ZM21157@torch.brasslantern.com> <160603225821.ZM25900@torch.brasslantern.com> From: Sebastian Gniazdowski Date: Sat, 4 Jun 2016 08:41:43 +0200 Message-ID: Subject: Re: MBEGIN, MEND in #m when pattern has "|" To: Bart Schaefer Cc: Zsh hackers list Content-Type: text/plain; charset=UTF-8 On 4 June 2016 at 07:58, Bart Schaefer wrote: > So if you change your expression to be one of > > harray=( "${(f)${text//(#mi)(${~colsearch_pattern})/|$(( MBEGIN - 1 )) $(( > MEND )) fg=red,bold|$nl}%$nl*}" ) > > [added parens around the alternates] or > > harray=( "${(f)${text//(#i)${~colsearch_pattern}(#m)/|$(( MBEGIN - 1 )) $(( > MEND )) fg=red,bold|$nl}%$nl*}" ) > > [moved (#m) to the end] then $MBEGIN et al. work as you desire. I suspect > you actually want the first with the parens because otherwise the (#i) also > ends at the "|". This helps, thanks! In my other project I was using (), probably because I suspected that alternative requires it. Best regards, Sebastian Gniazdowski