From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21338 invoked from network); 16 Nov 2000 12:18:24 -0000 Received: from sunsite.dk (HELO sunsite.auc.dk) (130.225.51.30) by ns1.primenet.com.au with SMTP; 16 Nov 2000 12:18:24 -0000 Received: (qmail 8240 invoked by alias); 16 Nov 2000 12:18:19 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 13169 Received: (qmail 8233 invoked from network); 16 Nov 2000 12:18:18 -0000 Date: Thu, 16 Nov 2000 12:18:15 +0000 From: Adam Spiers To: zsh-workers@sunsite.auc.dk Subject: Re: PATCH: zsh and perl Message-ID: <20001116121815.B29327@thelonious.new.ox.ac.uk> Reply-To: Adam Spiers Mail-Followup-To: zsh-workers@sunsite.auc.dk References: <200011151056.LAA05515@beta.informatik.hu-berlin.de> <1001115160357.ZM4881@candle.brasslantern.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.4i In-Reply-To: <1001115160357.ZM4881@candle.brasslantern.com>; from schaefer@candle.brasslantern.com on Wed, Nov 15, 2000 at 04:03:57PM +0000 X-Home-Page: http://www.new.ox.ac.uk/~adam/ X-OS: RedHat Linux Bart Schaefer (schaefer@candle.brasslantern.com) wrote: > On Nov 15, 11:56am, Sven Wischnowsky wrote: > } > } I'm sure I'm missing something, but... why not just avoid the cd > } altogether? Something like > } > } new_pms=( $libdir/{[a-Z]*/***/,}*.pm~*blib* ) > } new_pms=( "${(@)new_pms#$libdir/}" ) > > I wondered about that myself. > > } probably testing if $libdir is non-empty before that... > > We already have reasonably confidence that $libdir is non-empty because it > came either from perl's @INC array or from a previous glob which it's then > iterating over with `for'. It also tests [[ -d $libdir && -x $libdir ]], > so I can't think of any reason for doing the cd. There probably isn't a good reason; I suspect I was struggling with the expansions at the time and thought this would simplify things.