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

RE: Dynamically adding to $mailpath?



 Ar an 19ú lá de mí 12, scríobh Borzenkov Andrey :

 > 1. $mailpath[$#mailpath+1] is evaluated before even trying to execute
 > anyting so the above is the same as
 > 
 > set ="{i}..."

 > 2. set foo[bar] is wrong for setting any variable anyway

D'oh. As Phil put it, too much Perl. 

 > 3. you do not need basename in zsh, it does it internally.

:-) Yeah, but I never came accross it in the docs, and basename works
in sh. 

 > 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.

The echo is built-in, isn't it?

-- 
It's time to put on makeup/It's time to dress up right,
It's time to raise the curtain on the Muppet Show tonight,



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