From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25287 invoked from network); 12 Sep 2006 14:32:14 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.5 (2006-08-29) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO,RCVD_IN_BL_SPAMCOP_NET autolearn=no version=3.1.5 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 12 Sep 2006 14:32:14 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 76435 invoked from network); 12 Sep 2006 14:32:07 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 12 Sep 2006 14:32:07 -0000 Received: (qmail 693 invoked by alias); 12 Sep 2006 14:32:05 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 22690 Received: (qmail 683 invoked from network); 12 Sep 2006 14:32:04 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 12 Sep 2006 14:32:04 -0000 Received: (qmail 76148 invoked from network); 12 Sep 2006 14:32:04 -0000 Received: from wx-out-0506.google.com (66.249.82.237) by a.mx.sunsite.dk with SMTP; 12 Sep 2006 14:32:00 -0000 Received: by wx-out-0506.google.com with SMTP id s7so2082229wxc for ; Tue, 12 Sep 2006 07:31:59 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=I1uAiXQ8bXybjigwrPYPdNs+kgv8VCU0zPbtNP4+re87ujhA7ShAiAfMftrX+wSH9/9jzxYBAGPP0Xs9+szv4oX12q/nUB2GZ7V6webyXcrmIL0VLqDgqeIOEQ9Z6C1bn6/coo5HyLh801sw4b/w2ZsrCCwUQR7NdI4NeGBrBvc= Received: by 10.90.120.6 with SMTP id s6mr2113789agc; Tue, 12 Sep 2006 07:31:59 -0700 (PDT) Received: by 10.90.68.17 with HTTP; Tue, 12 Sep 2006 07:31:58 -0700 (PDT) Message-ID: Date: Tue, 12 Sep 2006 16:31:58 +0200 From: "Nikolai Weibull" Sender: nikolai.weibull@gmail.com To: "Peter Stephenson" Subject: Re: ${${~:-*}//(#m)*/$MATCH=$MATCH} fails Cc: "Zsh hackers list" In-Reply-To: <200609120934.k8C9YJfc004342@news01.csr.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200609120934.k8C9YJfc004342@news01.csr.com> X-Google-Sender-Auth: f3bf68dbdb9cf99d On 9/12/06, Peter Stephenson wrote: > "Nikolai Weibull" wrote: > > Try the above with an echo. In zsh 4.3.2, this will give you an > > illegal UTF-8 character, an equal sign, and another illegal UTF-8 > > character. Is $MATCH accessing uninitialized memory? Or am I doing > > something wrong? > > Neither: the pattern matcher is being passed a tokenized string as the > test string for matching. This doesn't make sense, particularly since > the pattern matcher assumes the string can be metafied, which is what is > messing up the characters. The easy fix is just to untokenize all test > strings at that point (the pattern string needs tokens, of course). > > This stops the "*" being active at that point, although it's eligible > for the effect of a ~ in the context further out. What I mean is, > > % foo="* > % print ${${~foo}/\*/*} > * > % print ${~foo/\*/*} > Hm. My intent doesn't seem to have been clear. What I want it to do is print a list of files where each file is followed by an equal sign and the file again. This is for passing args to mkisofs with the -graft-points option. nikolai