Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: glob qualifier on intermediate directory / no symbolic links



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



Messages sorted by: Reverse Date, Date, Thread, Author