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.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,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 d6750865 for ; Mon, 4 Nov 2019 06:08:51 +0000 (UTC) Received: (qmail 19 invoked by alias); 4 Nov 2019 06:08:42 -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: 24394 Received: (qmail 15479 invoked by uid 1010); 4 Nov 2019 06:08:41 -0000 X-Qmail-Scanner-Diagnostics: from st13p97im-ztdg18291001.me.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(17.41.193.146):SA:0(-2.7/5.0):. Processed in 1.17755 secs); 04 Nov 2019 06:08:41 -0000 X-Envelope-From: c.nebel@mac.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at mac.com designates 17.41.193.146 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mac.com; s=1a1hai; t=1572847685; bh=+YvEOH9eqyKUsDaxM9gyWg9dMgBQX2nLOoFjIKBqZ0E=; h=From:Content-Type:Subject:Message-Id:Date:To; b=ZqbczssvuSujm0CBoTPJ1pQlFTZ3ZgvR0a0SWmTVPPyf4s7L8qjBAuaVAryqQ4pQ3 k8QJUjGLkID6oizC6OGCwbonoycxO5KaPOVRYbbbaRCJchY3OQSHpVRFRt1OhDCOs3 kyF0uGghilj90gapovSot+DR1zU9Sjzi+Ty1ReZaEv0pctk8a/tyfxrXkX40SyARX1 4D+s/DVQ+Lx9Gzzx+vgPgCBn1gSQ+j8Rm1LvhUemJlIC0Nc1L7bglKa4Nk6hXAqOus 99zi2vV/+bjMGOg/Wj7yPdGon7Zxrz2fLa85V7bjb8YcCp/0veGTp3UseD4iFeq7wj u2V+RDYDZmUsQ== From: Chris Nebel Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Use of (e:...:) glob qualifier with _files -g? Message-Id: <206B06E5-8D28-4132-A0CC-BE070F9A5F7C@mac.com> Date: Sun, 3 Nov 2019 22:08:04 -0800 To: zsh-users@zsh.org X-Mailer: Apple Mail (2.3445.104.11) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-11-04_05:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 mlxscore=0 mlxlogscore=599 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-1911040060 In an attempt to get my darwinup completer to only complete actual = archive files, I=E2=80=99ve been playing with the shell code glob = qualfiers. For example, this will match everything file(1) says is an = archive of some sort: *(e:'file -bz $REPLY | grep -wq archive') Works great at the shell prompt, but I have been unable to use it =E2=80=94= or pretty much any (e:=E2=80=A6:) expression =E2=80=94 with =E2=80=9C_fil= es -g=E2=80=9D. Since it seems to break as soon as I have a space in = the expression, I suspect it=E2=80=99s some sort of quoting problem, but = I=E2=80=99m stumped for a solution. I do have a workaround, which is to = define a function and use the =E2=80=9C+=E2=80=9D qualifier instead: _is_darwinup_root () { file -bz $REPLY | grep -wq archive } _darwinup_roots () { _files -g '*(+_is_darwinup_root)' } =E2=80=A6but that means one more global-namespace function that I=E2=80=99= d rather not have. Any tips? =E2=80=94Chris N.=