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

Re: glob qualifier on intermediate directory / no symbolic links



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