Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: glob qualifier on intermediate directory / no symbolic links
- X-seq: zsh-users 24048
- From: Vincent Lefevre <vincent@xxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: glob qualifier on intermediate directory / no symbolic links
- Date: Fri, 12 Jul 2019 10:20:23 +0200
- In-reply-to: <CAP+y1xBPc_jLNLrGiXvYXSzjwWdvMj_gTDkP=d6wwG+rA9NhuA@mail.gmail.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-unsubscribe: <mailto:zsh-users-unsubscribe@zsh.org>
- Mail-followup-to: zsh-users@xxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <20190710133731.GA13596@cventin.lip.ens-lyon.fr> <CAP+y1xBPc_jLNLrGiXvYXSzjwWdvMj_gTDkP=d6wwG+rA9NhuA@mail.gmail.com>
On 2019-07-10 15:58:05 +0200, 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
This isn't even correct as there may be directories without the file
inside them.
Moreover, I was looking for something short to type, and possibly
compatible with completion widgets, such as expand-or-complete.
Otherwise, there would be a solution to use a function that does
what I want, of the form $(dirfile 'dirpattern' 'filepattern')
but this is not satisfactory.
--
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author