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 c1f50c90 for ; Sun, 21 Jul 2019 21:57:41 +0000 (UTC) Received: (qmail 14173 invoked by alias); 21 Jul 2019 21:57: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: List-Unsubscribe: X-Seq: 24083 Received: (qmail 28676 invoked by uid 1010); 21 Jul 2019 21:57:35 -0000 X-Qmail-Scanner-Diagnostics: from mail-wr1-f50.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.101.2/25517. spamassassin: 3.4.2. Clear:RC:0(209.85.221.50):SA:0(-2.0/5.0):. Processed in 0.795974 secs); 21 Jul 2019 21:57:35 -0000 X-Envelope-From: stephane.chazelas@gmail.com 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.221.50 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to:user-agent; bh=3iup//PZaCxlNrQIZyZpA7SgrmjPqsPMlQ2+AJD4KAM=; b=I2s84knV/DWITbS5V/C0GL7LO7r5/UORs37CLz/9+dpnWLuM3vxq5l3HwrwMP57WtX 9bFPCFLtyWiuYqfMDGPCsSHYSif40Sd68Q2VrwPjJAt40Y7G2dMaf8CSE9IAikRB0I8r 3T1ptbEmv4vVOQUg28I5ngZFdQTyPeTyiJTsdemhYQ0QJ6VgYfQn+grNPl4WJy71t4af LHMVoBG/nW4qZW0F+dgpdM9mUpQbXgIR0ZNBu9jicylmqSgpQoYOR4CdIMIJy99GCSGD KjFBnS8yo2rqRGFPt6uX+tgg0cjIl8VGBGdmLT8Kx3iqT8kMU3U93G2Ck5UzK1zHBFzn lUKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=3iup//PZaCxlNrQIZyZpA7SgrmjPqsPMlQ2+AJD4KAM=; b=rlA7U0nS5Vxn1uOKeYuT1WAhDCenJDJZ73eTSf8Wv68Kw85cthlic6kvzAat6676KT FC0tZRMxIcHDHcusf51HtqVStfOwqLJXN/veleOVv6WJ3M3K2yNwIizuhrxMFt6t5W6z PrkUucEofcRPZye0FeXiDgVmpSuPnb7CDX3CtNw4i1aiAKaoLe9hjcb+055eXWZUpDLN IW0UeX6agG4kDpbNZ3pg09LBIh9G+tDuU9a0KESXQacDgXT7dpo+rmJo/Y/hbU/s78V6 nxAjKFVqpX25XoX+7mOy0lg+gUmKsIPLnX77Co8kiupFN2DxSgkn2zc3xShypgG42vjG osCQ== X-Gm-Message-State: APjAAAW9kbNQgxGdgLeeTNnBEqVMX8OhAs3VnnQWjvKoYqA18d7cxeH0 1vJNb9XfmaYlEh/O2+9R9Mo= X-Google-Smtp-Source: APXvYqwgKa9Bo2a974NX6arG28Fcejm8oO8OmrNLCjdgDTT0RmE9UoAD1xbFLpJzapOlcteDOWQPDQ== X-Received: by 2002:adf:fe4f:: with SMTP id m15mr40182997wrs.36.1563746221066; Sun, 21 Jul 2019 14:57:01 -0700 (PDT) Date: Sun, 21 Jul 2019 22:56:59 +0100 From: Stephane Chazelas To: Mikael Magnusson Cc: Pier Paolo Grassi , Zsh-Users List Subject: Re: glob qualifier on intermediate directory / no symbolic links Message-ID: <20190721215659.inqxmv6vuonutamp@chaz.gmail.com> Mail-Followup-To: Mikael Magnusson , Pier Paolo Grassi , Zsh-Users List References: <20190710133731.GA13596@cventin.lip.ens-lyon.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20171215 2019-07-10 18:26:42 +0200, Mikael Magnusson: > On 7/10/19, Pier Paolo Grassi wrote: > > you can do something like this: > > > > setopt NULL_GLOB > > typeset -a arr=(*(^@)) > > ls ${^arr}/file > > > > but I'm curious if there is any solution that doesn't require using an > > intermediate array > > There isn't. [...] Well, there is ls -d -- (*/)##file~*/*/* (a corrected version of the one I suggested in my related zsh-workers thread at https://www.zsh.org/mla/workers/2019/msg00501.html). But I wouldn't call it "a solution". That works because (*/)## doesn't follow symlinks, but obviously that means crawling the whole directory tree while we only care for depth 1. -- Stephane