From: Stephane Chazelas <Stephane_Chazelas@yahoo.fr>
To: Zsh hackers list <zsh-workers@sunsite.dk>
Subject: Re: printf %b
Date: Thu, 4 Jan 2007 16:32:00 +0000 [thread overview]
Message-ID: <20070104163200.GA4883@sc> (raw)
In-Reply-To: <20070104153612.7aeb604f.pws@csr.com>
On Thu, Jan 04, 2007 at 03:36:12PM +0000, Peter Stephenson wrote:
[...]
> - \0NNN works for "echo" (OK)
> - printf's arguments are like echo (OK, need \0NNN.
> However, Stephane... this means that
> printf '\123'
> *doesn't* print S any more, it needs '\0123', too; that's changed
> back with the fix below.)
> - print without options is the same as echo except for some additions
> (\C-..., \M-..., \E) (WRONG: \0NNN doesn't work but \NNN does)
> - \NNN works for bindkey sequences (and hence for "print -b")
> (OK).
>
> The same goes for \0xNN and \xNN.
[...]
Hi Peter,
POSIX says
printf '\123'
and
printf %b '\0123'
should output "S" (note that the two syntaxes are different!)
and
printf '\0123' should output <NL>3
printf %b '\123' should output \123 (I think).
Cheers,
Stéphane
next prev parent reply other threads:[~2007-01-04 16:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-27 14:58 Stephane Chazelas
2007-01-04 15:36 ` Peter Stephenson
2007-01-04 16:32 ` Stephane Chazelas [this message]
2007-01-04 17:07 ` Peter Stephenson
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=20070104163200.GA4883@sc \
--to=stephane_chazelas@yahoo.fr \
--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).