From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3992 invoked by alias); 29 Sep 2016 15:51:19 -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: 21992 Received: (qmail 19044 invoked from network); 29 Sep 2016 15:51:19 -0000 X-Qmail-Scanner-Diagnostics: from mail-pa0-f52.google.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(209.85.220.52):SA:0(0.0/5.0):. Processed in 0.712926 secs); 29 Sep 2016 15:51:19 -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=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: schaefer@brasslantern.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at brasslantern.com does not designate permitted sender hosts) 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=kqCNOGfeAadBah9lHgtInflRSAg6uywZ1hzEIG10OUI=; b=aJN6zOXtM+j7r3IB3eiRQ3oV3awc/G10Gu+eEOS4uw9yCc9DKFMoOQKYru+NLX6TVd f4Xjl8Gs/eZWWc1PQwbhLmDVvCzLuX6o/mF2DznltXp+A3Ia7A9iVoaB/+TBW65Cx1yn dLLbR9EVPqFu+pc0+9jP02RhQwdPOy2nFRxYn4oIv3gv75dfIYHCHvM2LE2voEdy6FtE 6kO3QF2EDaX8llA+njuOoSl0Bre38S3fFLZLK3/24DfhJblk54ErZ2rwPknnwu150uPc UB33MRarDdcfXh8d2ssuJ9H7ZYP4w3ac08Sj42ZdGRgED5AkopP/TJGvZPg+UBHHGzJf RapA== 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=kqCNOGfeAadBah9lHgtInflRSAg6uywZ1hzEIG10OUI=; b=eXSiux4YPxxAdvj1KQx/jDyv/GVzgtzEYsZO/t6GvUGPh1tBNPyj1jZHWhoIdTGpsZ 9+0Sp8zQsT/BBs5wnjbOOKLlF/khwo+1JqDQX8TzK5E3f1S4vwXMR4UdSCaubuZbaSDo BPawDhNNnqH5nWoBFCKc25CMvGDjgs7xoImnG9h4rCB/NPPHyR1awwIFW1REBKGmXeNz bv+UPsTHPlMxZufXP8MDokNLuGgAWuYpnC/HKB1kYOSpnQqjIT+iHlP1c2S/0GRsCBSa cnhSq1myuiL49DXinX6s5nhHg2u4i375O/wb2sxuMEf28zqQiLBg/cFD9g5M2VZZsMKb 7KZg== X-Gm-Message-State: AA6/9RmYSTJZRJOspOB2ON1Fyjd8ss4EevU67uVeBQQRbPkwWmwW6IOmNIHplR54InXfxQ== X-Received: by 10.66.183.81 with SMTP id ek17mr3467256pac.153.1475164272657; Thu, 29 Sep 2016 08:51:12 -0700 (PDT) From: Bart Schaefer Message-Id: <160929085128.ZM29548@torch.brasslantern.com> Date: Thu, 29 Sep 2016 08:51:28 -0700 In-Reply-To: Comments: In reply to Mikael Magnusson "Re: Filtering an array of file names" (Sep 29, 9:54am) References: <160929001853.ZM27784@torch.brasslantern.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: Zsh Users Subject: Re: Filtering an array of file names MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Sep 29, 9:54am, Mikael Magnusson wrote: } } This should be } directories=( ${^allfiles}(/N) ) } unless you have nullglob set Thanks, and to Daniel also, for pointing out this nuance for the general case, but in the OP's specific example $allfiles contains only names of known existing files, so globbing is not expected to fail and (N) would not be necessary.