Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: new parameter flag?
- X-seq: zsh-workers 7597
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: PATCH: new parameter flag?
- Date: Wed, 1 Sep 1999 11:33:24 +0200 (MET DST)
- In-reply-to: Peter Stephenson's message of Wed, 01 Sep 1999 10:35:46 +0200
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
Peter Stephenson wrote:
> I suspect there may be an untokenization problem in the new parameter
> flags, or is the following expected for some reason?
>
> % print ${(%):-%~}
>
> % print "${(%):-%~}"
> /temp/pws/zsh-beta/Src
Oops. Yes, two untokenize()s missing.
> (by the way, is it supposed to work like that without a parameter name, or
> is it just coincidence, because it's quite convenient?)
I've made it work on the final result because I wanted to be able to
do just this (and I expect it will be used often together with `(%)'.).
Bye
Sven
--- os/subst.c Wed Sep 1 09:25:20 1999
+++ Src/subst.c Wed Sep 1 11:29:03 1999
@@ -1674,6 +1674,7 @@
ap = aval;
for (; *ap; ap++) {
unmetafy(*ap, &len);
+ untokenize(*ap);
*ap = unmetafy(promptexpand(metafy(*ap, len, META_NOALLOC),
0, NULL, NULL), &len);
}
@@ -1681,6 +1682,7 @@
if (!copied)
val = dupstring(val), copied = 1;
unmetafy(val, &len);
+ untokenize(val);
val = unmetafy(promptexpand(metafy(val, len, META_NOALLOC),
0, NULL, NULL), &len);
}
--
Sven Wischnowsky wischnow@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author