From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16970 invoked by alias); 29 Feb 2012 14:10:14 -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: 16814 Received: (qmail 6989 invoked from network); 29 Feb 2012 14:10:02 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,RCVD_IN_DNSWL_LOW, T_DKIM_INVALID,T_TO_NO_BRKTS_FREEMAIL autolearn=no version=3.3.2 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 209.85.161.171 as permitted sender) Received-SPF: pass (google.com: domain of jesper.nygards@gmail.com designates 10.101.180.40 as permitted sender) client-ip=10.101.180.40; Authentication-Results: mr.google.com; spf=pass (google.com: domain of jesper.nygards@gmail.com designates 10.101.180.40 as permitted sender) smtp.mail=jesper.nygards@gmail.com; dkim=pass header.i=jesper.nygards@gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=5oFr3D8Dn0YAACxfvVYn1D2iF2hc5wS7yIpthrizJAo=; b=DCmrRBV9O0a06kB30RdpzduYYvBV5SieJbe9WpWRk3HurGc0KXUivK3TbijT+Ocaa6 5qUORjHW74/5i53/YbOXfrRs590cNLGsYDQtaXMluMzW+7qoOGezRnmSOcklRAt3bfVY mtWfBvPzemaus/rSK5dCd0IBm9SlkJNw+6wGk= MIME-Version: 1.0 In-Reply-To: References: Date: Wed, 29 Feb 2012 14:43:20 +0100 Message-ID: Subject: Re: Filtering an array From: =?ISO-8859-1?Q?Jesper_Nyg=E5rds?= To: zsh-users@zsh.org Content-Type: text/plain; charset=ISO-8859-1 2012/2/28 S. Cowles : > this is my version of your function. Thanks for sharing this; it contains many useful idioms that I will incorporate into my own solution. However, if I read it correctly, your solution solves a different problem than the one I was trying to solve: you version lists all files that match ANY of the given patterns, whereas my intent was to only list files which matches ALL of the given patterns. That's the reason for my cumulative filtering of the results in myfiles. Thanks again, Jesper