zsh-workers
 help / color / mirror / code / Atom feed
From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: PATCH: Re: parameter frag K
Date: Fri, 28 Jan 2000 14:08:28 +0100 (MET)	[thread overview]
Message-ID: <200001281308.OAA21978@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: Tanaka Akira's message of 28 Jan 2000 21:15:56 +0900


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


                 reply	other threads:[~2000-01-28 13:08 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200001281308.OAA21978@beta.informatik.hu-berlin.de \
    --to=wischnow@informatik.hu-berlin.de \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).