From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7378 invoked from network); 19 Dec 2002 12:03:41 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 19 Dec 2002 12:03:41 -0000 Received: (qmail 21881 invoked by alias); 19 Dec 2002 12:03:29 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 5596 Received: (qmail 21868 invoked from network); 19 Dec 2002 12:03:28 -0000 From: Aidan Kehoe MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 8bit Message-ID: <15873.46479.842079.657817@gargle.gargle.HOWL> Date: Thu, 19 Dec 2002 12:03:27 +0000 To: zsh-users@sunsite.dk Subject: RE: Dynamically adding to $mailpath? In-Reply-To: <6134254DE87BD411908B00A0C99B044F03A0B5AC@MOWD019A> References: <15873.44013.976882.301072@gargle.gargle.HOWL> <6134254DE87BD411908B00A0C99B044F03A0B5AC@MOWD019A> Reply-To: Aidan Kehoe X-Echelon-distraction: JPL data-haven GEBA World Trade Center SAO SNS Sender: Aidan Kehoe 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,