From: Wayne Davison <wayned@users.sourceforge.net>
To: Thorsten Dahlheimer <tdahlheim@gmx.net>
Cc: zsh-workers@sunsite.dk
Subject: Re: PATCH: Expansion of \c escape sequences
Date: Sat, 23 Jul 2005 22:52:20 -0700 [thread overview]
Message-ID: <20050724055220.GA19554@blorf.net> (raw)
In-Reply-To: <003c01c58ff5$870469a0$13e6fea9@pcdahl4201>
[-- Attachment #1: Type: text/plain, Size: 678 bytes --]
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..
[-- Attachment #2: backslash-c.patch --]
[-- Type: text/plain, Size: 320 bytes --]
--- 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':
next prev parent reply other threads:[~2005-07-24 5:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-24 2:15 Thorsten Dahlheimer
2005-07-24 5:52 ` Wayne Davison [this message]
2005-07-24 18:09 ` Thorsten Dahlheimer
2005-07-26 0:10 ` Wayne Davison
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=20050724055220.GA19554@blorf.net \
--to=wayned@users.sourceforge.net \
--cc=tdahlheim@gmx.net \
--cc=zsh-workers@sunsite.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).