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

Re: Dynamically adding to $mailpath?



On Dec 19,  1:06pm, Oliver Kiddle wrote:
} Subject: Re: Dynamically adding to $mailpath?
}
} 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.

On Dec 19,  3:44pm, Borzenkov Andrey wrote:
} 
} And leaving just one of modifiers results in zsh: unknown file attribute.

It's a simple parsing issue.  The double-quotes aren't significant to the
glob parser, so the colons cause the parse tokens to be

    e
    REPLY=( "${REPLY}?You have new mail in ${REPLY
    t
    r}")

Try it this way:

mailpath=( ~/mail/*.spool(e['REPLY=( "${REPLY}?You have new mail in ${REPLY:t:r}")']) )

On Dec 19,  1:06pm, Oliver Kiddle wrote:
}
} 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)

It causes a seg fault immediately in 4.0.6, so it's something that changed
after 4.0.2.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   



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