From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11533 invoked by alias); 10 May 2016 16:42: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: 21541 Received: (qmail 2919 invoked from network); 10 May 2016 16:42:34 -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:date:message-id:subject:from:to :cc; bh=assltJ9qXJaZ/p9NQKoLrLLjPUVf8zg7ajzrccKFspo=; b=HyTDnLzJSEIdq1WOIT6TppaKjkhvFBGICUkzAq3GGDryf5f2JsmlnLUiEPRBwYjcFE X+QxAg/MFjU1F0x4SQVJBHO+79kMBhHuupsW44IJdwQRSBmXgUd+q3NKCjQE5I+sEicN xoWNG5PpI8HHMNAy4U691fWWU5I218Auz7w1xlHkKc3jCAyA3ofzQX8pwDL8VTkk5IbA dhimyDMMfoOR+GlqLk1LsGQVRtx68upf0V7Wm1o3qNZzfmxjz+Ukh+ZHpdxJY+ugaJZD 0l3ZiNCkb/S/if25Q0glM/2rxN3nlP3jtULmu73vfnnTMnKKFgPuIMq4iHbL72gxNhMJ 8sVg== 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:date :message-id:subject:from:to:cc; bh=assltJ9qXJaZ/p9NQKoLrLLjPUVf8zg7ajzrccKFspo=; b=gaEP4wZUFI51aqAROu3zCqx4PkykeM4sJQkhYhD8PftpHNaF1NX+GfszqFy9eTflHG ELiqchgS/abURT7857CDkEDw+Dh/oktAPEQxVoWp0N2u6+dgMrzPTFWP7Ixu2UBUzOyM lYKyYv8MH29yofj+BhxwI6Hhp04bfaYaCHUI4FnC+HBdIAr6AQlVBJ+6GkOpa0INkN63 JJEu27idABidhernj/mJgtxO463umNgyUqGVy6MS6CZ60ZH7bG/zcEOVG8GK9oaHA3IW bXVfr7jRh3XfNF7rK2+BXvOe/CF8FDQ9b0UaPsc7GySh1cEGP6dNY35d94ODLGPPK0vb MCCA== X-Gm-Message-State: AOPr4FUEjm24Pomlip1l650b/Rb1ALCzayVk+S9xha3romgDiS5yXPHfthi4BdTOO3nxmW3pE6qICiu4WP4vqA== MIME-Version: 1.0 X-Received: by 10.55.99.214 with SMTP id x205mr44191202qkb.3.1462898550659; Tue, 10 May 2016 09:42:30 -0700 (PDT) In-Reply-To: <160509205620.ZM17429@torch.brasslantern.com> References: <160509205620.ZM17429@torch.brasslantern.com> Date: Tue, 10 May 2016 18:42:30 +0200 Message-ID: Subject: Re: Why approximate pattern doesn't match? From: Mikael Magnusson To: Bart Schaefer Cc: Zsh Users Content-Type: text/plain; charset=UTF-8 On Tue, May 10, 2016 at 5:56 AM, Bart Schaefer wrote: > 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? I think I sent a mail to the list when I discovered it, the operations simplify to "AND", which we don't have as a primitive. Eg foo~^bar means result that match both patterns foo and bar. It is most obviously useful when the second or first pattern is surrounded by * so that it means *foo*~^*bar* gives files foobazbar, barbazfoo, barfoo etc. -- Mikael Magnusson