Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
RE: Dynamically adding to $mailpath?
- X-seq: zsh-users 5596
- From: Aidan Kehoe <kehoea@xxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: RE: Dynamically adding to $mailpath?
- Date: Thu, 19 Dec 2002 12:03:27 +0000
- In-reply-to: <6134254DE87BD411908B00A0C99B044F03A0B5AC@MOWD019A>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <15873.44013.976882.301072@xxxxxxxxxxxxxxxxxx> <6134254DE87BD411908B00A0C99B044F03A0B5AC@MOWD019A>
- Reply-to: Aidan Kehoe <kehoea@xxxxxxxxxxxxx>
- Sender: Aidan Kehoe <kehoea@xxxxxxxxxxxxx>
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