From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id f7cc78bf for ; Mon, 4 Nov 2019 06:57:30 +0000 (UTC) Received: (qmail 5789 invoked by alias); 4 Nov 2019 06:57:24 -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: List-Unsubscribe: X-Seq: 24395 Received: (qmail 21183 invoked by uid 1010); 4 Nov 2019 06:57:24 -0000 X-Qmail-Scanner-Diagnostics: from mail-yb1-f180.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.0/25622. spamassassin: 3.4.2. Clear:RC:0(209.85.219.180):SA:0(-1.9/5.0):. Processed in 2.59378 secs); 04 Nov 2019 06:57:24 -0000 X-Envelope-From: dana@dana.is X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.219.180 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dana-is.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=tVGfvOEiJSheNUHEPI2MdQb/IJayUPYMypxPQgPMkPs=; b=NlHrJjVNeM72sSm0UO5R4Tjszx1VVAk24GMceA451sU6KEZhWaZov9PuXylTXMzm4e nPkob5dfJUNKDuVJ/dbSOnEg5Tdyj75e+FnTN4N7b5mph5opAKxrTyQDYyf/00CdaRbD EFd8PZ6FhJfYcJNv717lgxW1c9AyUz/Ti6ozqgCsI1dLMPNMLFc5gM23nzJznVOHXoJj xRcRJcnfhPjYxIqOoO68bLNKly61/DD1w2OH5HLIUwkBRF6as6IaBikogyyJbGf06jYu TC4bONY0Pjrio9WKx4XY72X0sNTnfDlxx0GURcNRPE1scbAAVgTvYiGp58BeKB+YQcRP RwfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=tVGfvOEiJSheNUHEPI2MdQb/IJayUPYMypxPQgPMkPs=; b=YfuXO3P4rtSy06aueG/x9ASmxooFmG+8mYRJhWHeJ5DuGpaRmcp/T+oGVQKJsN/Wi9 zk4G4wxMAVgi1H0CuGGixQuuPDTOld7ug/o5VTeYzWe7HenWnGqgVADZG7CHkhkjZ4jm YYj7/1zKj68aIWoNaZR6Xf1t9SQjEWoVJj/c28IAaEv7ZKOwqQBUpPC0G+YWqeQkPohB zYsF7rvmr1mhNi1BLTQC8jcJbabCZKdyCAMLnxLRHGQ7/nd8q/WfMiaJONdlYhEEuikc DOT5eF0TUzzhR6/opBCBMm2CtqSV9hPDMYOpen15i4t9FWP4hAW/5PArdjhaIp9nyh9C G6GA== X-Gm-Message-State: APjAAAVXx+xqKWKAZVx4ey5U5UubjJW1o9XHiS1LWIDQqk9EuyrVSmqD xxRFHMZrXPHqvSFUfvIMYW2rb/6cixoj5g== X-Google-Smtp-Source: APXvYqxDC1oZeFn0Tcd1tnetTO0PkExDxy3A0hKo1bxtlX4ToCPeYl0cl3iYV0ooOK+DJ5VwvM5nCQ== X-Received: by 2002:a25:8185:: with SMTP id p5mr15554081ybk.91.1572850608669; Sun, 03 Nov 2019 22:56:48 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: Use of (e:...:) glob qualifier with _files -g? From: dana In-Reply-To: <206B06E5-8D28-4132-A0CC-BE070F9A5F7C@mac.com> Date: Mon, 4 Nov 2019 00:56:47 -0600 Cc: zsh-users Content-Transfer-Encoding: quoted-printable Message-Id: <8F91689D-3069-4A1F-A4B2-3BF6F009B878@dana.is> References: <206B06E5-8D28-4132-A0CC-BE070F9A5F7C@mac.com> To: Chris Nebel X-Mailer: Apple Mail (2.3445.104.11) On 4 Nov 2019, at 00:08, Chris Nebel wrote: > *(e:'file -bz $REPLY | grep -wq archive') I'm not sure that's even a good idea. You'd be running an external = process against every single file the function encountered. On network drives or = in directories with many files that could take a while. Also, i've never used darwinup, but it looks to me like it supports only = a select number of archive formats, which are guessed based on the file extension and enumerated here: = https://github.com/macosforge/darwinbuild/blob/master/darwinup/Archive.cpp= #L323 If that's the case, you should be able to just use = '*.(tar|zip|whatever)', which is much simpler and faster. With that said, to answer your actual question, i think the reason it = doesn't work is that _files has an undocumented feature where if it detects = unescaped white space in the pattern it assumes that you're trying to supply = *multiple* patterns to be transformed into a brace expansion. Maybe there is some = very fancy quoting you can do to make that work, but at that point i think = using the + qualifier would be easier. dana