From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: Re: PATCH: new parameter flag?
Date: Wed, 1 Sep 1999 11:33:24 +0200 (MET DST) [thread overview]
Message-ID: <199909010933.LAA32746@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: Peter Stephenson's message of Wed, 01 Sep 1999 10:35:46 +0200
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@informatik.hu-berlin.de
next reply other threads:[~1999-09-01 9:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-09-01 9:33 Sven Wischnowsky [this message]
-- strict thread matches above, loose matches on Subject: below --
1999-08-31 12:43 Sven Wischnowsky
1999-09-01 8:35 ` Peter Stephenson
1999-08-31 11:45 Sven Wischnowsky
1999-08-31 12:25 ` Zefram
1999-08-30 9:39 Sven Wischnowsky
1999-08-31 9:29 ` Zefram
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=199909010933.LAA32746@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).