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

RE: Dynamically adding to $mailpath?



> 
> Andrey wrote:
> >
> > mailpath=((${$(echo ~/mail/*.spool(N))//(#m)*/$MATCH?You have new mail
> in
> > ${MATCH:r:t}}))
> >
> > should work though. Unfortunately you still need one fork (echo) unless
> I
> > miss some obvious way to treat result of nested globbing as array.
> 
> My attempt at this was along the lines of:
> 
> mailpath=( ~/mail/*.spool(e:'REPLY=( "${REPLY}?You have new mail in
> ${REPLY:t:r}")':) )
> 
> it doesn't need a fork but there seems to be a bug somewhere because I
> get `zsh: unmatched "' errors. It's okay if I remove the :t:r modifiers
> though.
> 

And leaving just one of modifiers results in zsh: unknown file attribute.

-andrey



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