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 running this twice in 4.1.0-dev-6 (but not in 4.0.2) causes a seg fault:
  echo *(e:'REPLY=( ${REPLY}?${REPLY} )':)

(I forgot to quote the ? when trying that)

Oliver

This e-mail and any attachment is for authorised use by the intended recipient(s) only.  It may contain proprietary material, confidential information and/or be subject to legal privilege.  It should not be copied, disclosed to, retained or used by, any other party.  If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender.  Thank you.



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