From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2621 invoked by alias); 10 May 2016 03:55:34 -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: 21530 Received: (qmail 1293 invoked from network); 10 May 2016 03:55:32 -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,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 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=Z5r5vSBQ2O/0bKuKOgj5qHh5h1O5ujyVi+LzBjiWE+g=; b=rpSnkxvCaQoZaiU2TStMvX37XeQ5Geiv7VJIYv52BcMDh1EbyI+sADa3XIjo5AXoQl nxr3XGFZ572f+EPcMHF6dDLAaU1Lf4xmheLFnLUpM8S30RdsGpG0hC6FNAlrbuTEPwpo kxEsIG5nWnZL8y+CDZ6UpDqFbRKihuZQvoAa2qmX2znqtcyLCYKtQSYXzMbIQYs2bNjS rcMe46yqDZR8y4+nDcAOtK3tZX8jTVrtfo3Vd45qmKHhzIDjKkO/uTiAEZLEAbxlLGVH hGQu7eeCiIbAhZk5iuHAfB4RIdim6vvax6r5wEwR33eOD2WgbMXcY/FJjLRnTH6sgXdV H5gQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version; bh=Z5r5vSBQ2O/0bKuKOgj5qHh5h1O5ujyVi+LzBjiWE+g=; b=XApiBfS7+AisQuL47viP2MnIRl2tScingDys94pfcniwfCJwlpAxwby0vk+L31asQk NG9P/wL/lKpcx0um7Vst5fEDAXw9UM8zB1clBNJFskHAuG34kHnkzq6ytnafFgF0nEpB RLbIH3r7J9gmGDWG2jnMI/iwK4Gq2cw/Fjd+32F4/9P0CmQUFhUPP7XYF2PMAVNnxjHB wFC5/iCGUnL2SkRq1PhzwDz7+geCKdl4VykQxXD04x0basWhjWsv6M2AoUaA+j5985UI NPObjHYN/ZmFEwwcQ7i3pUEhS+BFxSHKm365dcL9+QsgGmrYczwWIl0Xbt25LgFgQhUl Xq2Q== X-Gm-Message-State: AOPr4FVeIt4ehrOnajSncR21bpxD6uMbC1p/rx/X0mPobHk7AilrSxMwfY51+IgiWowNUA== X-Received: by 10.98.52.68 with SMTP id b65mr24012303pfa.24.1462852530253; Mon, 09 May 2016 20:55:30 -0700 (PDT) From: Bart Schaefer Message-Id: <160509205620.ZM17429@torch.brasslantern.com> Date: Mon, 9 May 2016 20:56:20 -0700 In-Reply-To: Comments: In reply to Sebastian Gniazdowski "Re: Why approximate pattern doesn't match?" (May 9, 10:11pm) References: X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: Zsh Users Subject: Re: Why approximate pattern doesn't match? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On May 9, 10:11pm, Sebastian Gniazdowski wrote: } Subject: Re: Why approximate pattern doesn't match? } } Hello again, } it appears that the approximate matching works only for first word in } the *~^* sequence: } } a=( "git push" ) } pattern1='git*~^*pash*' I read that as: git followed by anything, except NOT matching (~) anything NOT containing "pash". Who came up with that double-negative? } Any solution? It doesn't seem so. /* * By default, approximations are turned off in exclusions: * we need to do this here as otherwise the code compiling * the exclusion doesn't know if the flags have really * changed if the error count gets restored. */ So you don't get approximate non-matching, only approximate matching. You can possibly refactor it this way: a=( "git push" ) pat1='git*' pat2='*pash*' echo ${(@M)${(@M)a:#(#ia2)$~pat1}:#(#ia2)$~pat2}