From: Vincent Lefevre <vincent@vinc17.net>
To: zsh-users@zsh.org
Subject: Re: glob qualifier on intermediate directory / no symbolic links
Date: Fri, 12 Jul 2019 10:20:23 +0200 [thread overview]
Message-ID: <20190712082023.GA3983@zira.vinc17.org> (raw)
In-Reply-To: <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@vinc17.net> - 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)
next prev parent reply other threads:[~2019-07-12 8:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-10 13:37 Vincent Lefevre
2019-07-10 13:58 ` Pier Paolo Grassi
2019-07-10 16:26 ` Mikael Magnusson
2019-07-12 8:20 ` Vincent Lefevre [this message]
[not found] ` <20190712082023.GA3983__17556.0249060922$1562919714$gmane$org@zira.vinc17.org>
2019-07-21 21:40 ` Stephane Chazelas
[not found] ` <CAHYJk3QJO8XGhJoKVFWugV6pnMDzPs8C=NmYPWQheBUooexv0w__28304.959919636$1562776081$gmane$org@mail.gmail.com>
2019-07-21 21:56 ` Stephane Chazelas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190712082023.GA3983@zira.vinc17.org \
--to=vincent@vinc17.net \
--cc=zsh-users@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).