From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12353 invoked from network); 24 Jul 2005 05:52:34 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 24 Jul 2005 05:52:34 -0000 Received: (qmail 1405 invoked from network); 24 Jul 2005 05:52:28 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 24 Jul 2005 05:52:28 -0000 Received: (qmail 7328 invoked by alias); 24 Jul 2005 05:52:26 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 21513 Received: (qmail 7319 invoked from network); 24 Jul 2005 05:52:25 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 24 Jul 2005 05:52:25 -0000 Received: (qmail 1137 invoked from network); 24 Jul 2005 05:52:25 -0000 Received: from dsl3-63-249-88-2.cruzio.com (HELO dot.blorf.net) (63.249.88.2) by a.mx.sunsite.dk with SMTP; 24 Jul 2005 05:52:21 -0000 Received: by dot.blorf.net (Postfix, from userid 1000) id 067B365EF; Sat, 23 Jul 2005 22:52:21 -0700 (PDT) Date: Sat, 23 Jul 2005 22:52:20 -0700 From: Wayne Davison To: Thorsten Dahlheimer Cc: zsh-workers@sunsite.dk Subject: Re: PATCH: Expansion of \c escape sequences Message-ID: <20050724055220.GA19554@blorf.net> References: <003c01c58ff5$870469a0$13e6fea9@pcdahl4201> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="bg08WKrSYDhXBjb5" Content-Disposition: inline In-Reply-To: <003c01c58ff5$870469a0$13e6fea9@pcdahl4201> User-Agent: Mutt/1.5.9i X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.4 --bg08WKrSYDhXBjb5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Thanks for the \c fixes and your earlier Makefile.in patch -- I've checked them into CVS (and I improved the function-comment for getkeystring() while I was at it). On Sun, Jul 24, 2005 at 04:15:12AM +0200, Thorsten Dahlheimer wrote: > Finally, I've discovered that \c in an argument to a printing command > only suppresses the final newline, but according POSIX it should > suppress all output after the \c, and that's what ksh, bash, and > echo/printf from GNU coreutils do. I'm curious which version of coreutils behaves that way? I've got 5.2.1 on my system, and it behaves as zsh does. If we want to change the behavior, the attached patch should handle it. ..wayne.. --bg08WKrSYDhXBjb5 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="backslash-c.patch" --- Src/utils.c 24 Jul 2005 05:19:58 -0000 1.80 +++ Src/utils.c 24 Jul 2005 05:42:08 -0000 @@ -3611,7 +3611,9 @@ getkeystring(char *s, int *len, int from case 'c': if (fromwhere < 2) { *misc = 1; - break; + *t = '\0'; + *len = t - buf; + return buf; } goto def; case 'u': --bg08WKrSYDhXBjb5--