Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: problem/bug: array definition from command (backticks) [long]
- X-seq: zsh-users 3958
- From: Clint Adams <clint@xxxxxxx>
- To: Jörg Ziefle <gt4556a@xxxxxxxxxxxxxxxx>
- Subject: Re: problem/bug: array definition from command (backticks) [long]
- Date: Tue, 26 Jun 2001 23:12:14 -0400
- Cc: zsh-users@xxxxxxxxxx
- In-reply-to: <20010626220704.A25876@xxxxxxxxxxxxxxxx>; from gt4556a@xxxxxxxxxxxxxxxx on Tue, Jun 26, 2001 at 09:42:38PM -0400
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20010626220704.A25876@xxxxxxxxxxxxxxxx>
> With the following line in my ~/.zshrc, I specify the mailfolders that I
> want zsh to watch for new mail:
>
> mailpath=(`~/bin/printmailfolders-zsh.pl`)
If you read the docs on command substitution, you'll see that
If the substitution is not
enclosed in double quotes, the output is
broken into words using the IFS parameter.
I think that the following accomplishes what you want, except for checking
if the file is ASCII.
mailpath=(${(f)"$(for i in $HOME/{Mail,savenews}/[^.]*(.rNL+0) ; print $i\?New mail in ${i:t})"})
Messages sorted by:
Reverse Date,
Date,
Thread,
Author