From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17788 invoked from network); 19 Aug 1999 07:56:04 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 19 Aug 1999 07:56:04 -0000 Received: (qmail 20208 invoked by alias); 19 Aug 1999 07:55:53 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7446 Received: (qmail 20201 invoked from network); 19 Aug 1999 07:55:52 -0000 Date: Thu, 19 Aug 1999 09:55:51 +0200 (MET DST) Message-Id: <199908190755.JAA17536@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk Subject: PATCH: terminal prompt escapes 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@informatik.hu-berlin.de