From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7813 invoked from network); 28 Jan 2000 13:08:50 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 28 Jan 2000 13:08:50 -0000 Received: (qmail 24424 invoked by alias); 28 Jan 2000 13:08:32 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9457 Received: (qmail 24416 invoked from network); 28 Jan 2000 13:08:31 -0000 Date: Fri, 28 Jan 2000 14:08:28 +0100 (MET) Message-Id: <200001281308.OAA21978@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: Tanaka Akira's message of 28 Jan 2000 21:15:56 +0900 Subject: PATCH: Re: parameter frag K Tanaka Akira wrote: > I found a problem of the parameter frag K. > > Z(2):akr@is27e1u11% Src/zsh -f > is27e1u11% t='[' > is27e1u11% typeset -A a > is27e1u11% a=('\[' x) > is27e1u11% print -lr - $a[(K)$t] > > is27e1u11% > > This should print `x'. Small tokenization problem here... Bye Sven diff -ru ../z.old/Src/params.c Src/params.c --- ../z.old/Src/params.c Fri Jan 28 10:23:25 2000 +++ Src/params.c Fri Jan 28 14:05:28 2000 @@ -376,6 +376,7 @@ char *tmp = dupstring(v.pm->nam); tokenize(tmp); + remnulargs(tmp); if (!(prog = patcompile(tmp, 0, NULL)) || !pattry(prog, scanstr)) return; @@ -966,9 +967,10 @@ if (ishash) { scanprog = pprog; scanstr = s; - if (keymatch) + if (keymatch) { + untokenize(s); v->isarr |= SCANPM_KEYMATCH; - else if (ind) + } else if (ind) v->isarr |= SCANPM_MATCHKEY; else v->isarr |= SCANPM_MATCHVAL; -- Sven Wischnowsky wischnow@informatik.hu-berlin.de