Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: terminal prompt escapes
- X-seq: zsh-workers 7446
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: PATCH: terminal prompt escapes
- Date: Thu, 19 Aug 1999 09:55:51 +0200 (MET DST)
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
While testing the stuff from my last mail I noticed that `print -P "%s"'
printed a `\210' for me. This was caused by an off-by-one error in
promptexpand().
Bye
Sven
--- os/prompt.c Mon Aug 9 10:40:42 1999
+++ Src/prompt.c Thu Aug 19 09:07:36 1999
@@ -171,11 +171,13 @@
*bp = 0;
if (!ns) {
/* If zero, Inpar, Outpar and Nularg should be removed. */
- for (bp = buf; *bp; bp++) {
+ for (bp = buf; *bp; ) {
if (*bp == Meta)
- bp++;
+ bp += 2;
else if (*bp == Inpar || *bp == Outpar || *bp == Nularg)
chuck(bp);
+ else
+ bp++;
}
}
return buf;
--
Sven Wischnowsky wischnow@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author