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

Re: globbing for links in pathnames



On Thu, Feb 04, 1999 at 04:56:00PM -0800, Bart Schaefer wrote:
> On Feb 4,  6:27pm, Sweth Chandramouli wrote:
> > Subject: Re: globbing for links in pathnames
> > On Thu, Feb 04, 1999 at 03:36:10PM -0700, Steve Talley wrote:
> > > [...]  Is there a way to only specify the
> > > links (or non-links) in the glob?  Something like
> > > 
> > > % ls pkgs/*(@)/man
> > 
> > % ls $( ls -d test/*(@) )/man(/)
> 
> zsh% setopt globassign
> zsh% x=*(@) eval 'ls $^x/man(/)'

	according to the docs, globassign is deprecated, because
globbing is done implicitly so long as the parameter is explicitly
set to an array.  so it should end up something like the following:

x=(pkgs/*(@)) ; ls -d ${^x}/man(/)

	-- sweth, who is now wondering if he could combine this
with the earlier discussion about nested expansion to make a single
inscrutable argument to ls -d to achieve this via (P).

-- 
Sweth Chandramouli
IS Coordinator, The George Washington University
<sweth@xxxxxxx> / (202) 994 - 8521 (V) / (202) 994 - 0458 (F)
<a href="http://astaroth.nit.gwu.edu/~sweth/disc.html";>*</a>



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