From: Stephane Chazelas <stephane.chazelas@gmail.com>
To: zsh-users@zsh.org
Subject: Re: glob qualifier on intermediate directory / no symbolic links
Date: Sun, 21 Jul 2019 22:40:59 +0100 [thread overview]
Message-ID: <20190721214059.pyvxg7zjeeozuf4r@chaz.gmail.com> (raw)
In-Reply-To: <20190712082023.GA3983__17556.0249060922$1562919714$gmane$org@zira.vinc17.org>
2019-07-12 10:20:23 +0200, Vincent Lefevre:
> 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.
[...]
I raised a similar query on the zsh-workers mailing list at
https://www.zsh.org/mla/workers/2019/msg00501.html
There was no feedback though.
--
Stephane
next prev parent reply other threads:[~2019-07-21 21:41 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
[not found] ` <20190712082023.GA3983__17556.0249060922$1562919714$gmane$org@zira.vinc17.org>
2019-07-21 21:40 ` Stephane Chazelas [this message]
[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=20190721214059.pyvxg7zjeeozuf4r@chaz.gmail.com \
--to=stephane.chazelas@gmail.com \
--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).