Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Dynamically adding to $mailpath?
- X-seq: zsh-workers 18017
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: Dynamically adding to $mailpath?
- Date: Thu, 19 Dec 2002 13:06:26 +0100
- In-reply-to: <6134254DE87BD411908B00A0C99B044F03A0B5AC@MOWD019A>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <6134254DE87BD411908B00A0C99B044F03A0B5AC@MOWD019A>
- Sender: kiddleo@xxxxxxxxxx
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