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

Re: PATCH: zsh and perl



Bart Schaefer (schaefer@xxxxxxxxxxxxxxxxxxxxxxx) wrote:
> On Nov 15, 11:56am, Sven Wischnowsky wrote:
> }
> } I'm sure I'm missing something, but... why not just avoid the cd
> } altogether? Something like
> } 
> }   new_pms=( $libdir/{[a-Z]*/***/,}*.pm~*blib* )
> }   new_pms=( "${(@)new_pms#$libdir/}" )
> 
> I wondered about that myself.
> 
> } probably testing if $libdir is non-empty before that...
> 
> We already have reasonably confidence that $libdir is non-empty because it
> came either from perl's @INC array or from a previous glob which it's then
> iterating over with `for'.  It also tests [[ -d $libdir && -x $libdir ]],
> so I can't think of any reason for doing the cd.

There probably isn't a good reason; I suspect I was struggling with
the expansions at the time and thought this would simplify things.



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