From: Phil Pennock <Phil.Pennock@globnix.org>
To: Borzenkov Andrey <Andrey.Borzenkov@siemens.com>
Cc: 'Aidan Kehoe' <kehoea@parhasard.net>, zsh-users@sunsite.dk
Subject: Re: Dynamically adding to $mailpath?
Date: Thu, 19 Dec 2002 13:47:27 +0100 [thread overview]
Message-ID: <20021219134727.A9941@globnix.org> (raw)
In-Reply-To: <6134254DE87BD411908B00A0C99B044F03A0B5AC@MOWD019A>; from Andrey.Borzenkov@siemens.com on Thu, Dec 19, 2002 at 02:42:23PM +0300
On 2002-12-19 at 14:42 +0300, Borzenkov 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.
What I myself actually do is use a couple of temporary variables.
set -A _foo ~/Mail/Lists/*~*.lock(.) # not D -- don't check .meta etc
set -A _bar ~/Maildir/.*(/)
mailpath=( ${MAIL}
~/Maildir?"New mail in ~/Maildir"
"${^_bar[@]//(#m).*/$MATCH?New mail in $MATCH}"
"${^_foo[@]//(#m)*/$MATCH?You have new mail in ${MATCH:t}}" )
unset _foo _bar
--
"We've got a patent on the conquering of a country through the use of force.
We believe in world peace through extortionate license fees." -- Andy Forster
prev parent reply other threads:[~2002-12-19 12:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-19 11:22 Aidan Kehoe
2002-12-19 11:41 ` Phil Pennock
2002-12-19 11:42 ` Borzenkov Andrey
2002-12-19 12:03 ` Aidan Kehoe
2002-12-19 12:30 ` Borzenkov Andrey
2002-12-19 12:47 ` Phil Pennock [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20021219134727.A9941@globnix.org \
--to=phil.pennock@globnix.org \
--cc=Andrey.Borzenkov@siemens.com \
--cc=kehoea@parhasard.net \
--cc=zsh-users@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).