From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 946 invoked from network); 13 Dec 2000 17:39:57 -0000 Received: from sunsite.dk (HELO sunsite.auc.dk) (130.225.51.30) by ns1.primenet.com.au with SMTP; 13 Dec 2000 17:39:57 -0000 Received: (qmail 15536 invoked by alias); 13 Dec 2000 17:39:45 -0000 Mailing-List: contact zsh-users-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 3566 Received: (qmail 15529 invoked from network); 13 Dec 2000 17:39:43 -0000 From: "Bart Schaefer" Message-Id: <1001213173930.ZM12235@candle.brasslantern.com> Date: Wed, 13 Dec 2000 17:39:30 +0000 In-Reply-To: <20001213100537.P11810@rmtc> Comments: In reply to Steve Talley "Re: Anonymous array indexing" (Dec 13, 10:05am) References: <20001212184156.I11810@rmtc> <1001213040610.ZM11053@candle.brasslantern.com> <20001213100537.P11810@rmtc> X-Mailer: Z-Mail (5.0.0 30July97) To: Steve Talley Subject: Re: Anonymous array indexing Cc: zsh-users@sunsite.auc.dk MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Dec 13, 10:05am, Steve Talley wrote: } Subject: Re: Anonymous array indexing } } # Find a value for TERMINFO by looking for xterm package } delegates=(5.9 5.8.1 5.8 5.7 5.6) } terminfo=( $HOME/$^delegates/pkgs/xterm/lib/terminfo(/) ) } export TERMINFO=$terminfo[1] } unset terminfo } } Unfortunately this doesn't work well with your solution, ie. } } export TERMINFO=${${=:-$HOME/$^delegates/pkgs/xterm/lib/terminfo(/)}[2]} You've got two problems. One is that you're trying a file glob, which isn't going to work in the same shell-word with TERMINFO= (unless you resort to using `setopt globassign'). Two is that =:- is in the wrong place. For the second problem, you'd want $HOME/${^${=:-5.9 5.8.1 5.8 5.7 5.6}}/pkgs/xterm/lib/terminfo(/) You can get around the glob problem by using $(print ...), but I don't know why avoiding a temp parameter would be important enough to fork a new process. export TERMINFO=${$(print \ $HOME/${^${=:-5.9 5.8.1 5.8 5.7 5.6}}/pkgs/xterm/lib/terminfo(/))[1]} -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net