From: Herbert Xu <herbert@gondor.apana.org.au>
To: Jilles Tjoelker <jilles@stack.nl>
Cc: Harald van Dijk <harald@gigawatt.nl>,
luigi.tarenga@gmail.com, dash@vger.kernel.org
Subject: Re: [BUG] regression in builtin echo
Date: Fri, 2 Sep 2016 22:19:12 +0800 [thread overview]
Message-ID: <20160902141912.GA12739@gondor.apana.org.au> (raw)
In-Reply-To: <20160902141631.GA87540@stack.nl>
On Fri, Sep 02, 2016 at 04:16:31PM +0200, Jilles Tjoelker wrote:
>
> Unlike Harald van Dijk's patch, the above patch breaks \c. Per POSIX
> (XSI option), \c shall cause all characters following it in the
> arguments to be ignored (so not only in the argument where \c occurs).
> For example:
> echo 'a\cb' c; echo d
> shall write "ad" followed by a newline.
Works for me:
$ build/src/dash -c "echo 'a\cb' c; echo d"
ad
$
AFAICS my patch doesn't change \c handling at all. When we hit
\c print_escape_str will return 0x100, which guarantees that we
hit the berak.
Thanks,
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
next prev parent reply other threads:[~2016-09-02 14:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAKkO-EgCkv48unwXBjN1JdjSNx3_D1yCZQhde7WJedOFRUDaGg@mail.gmail.com>
2016-09-01 20:18 ` [BUG] regression in builtin echo Harald van Dijk
2016-09-02 13:14 ` Herbert Xu
2016-09-02 14:16 ` Jilles Tjoelker
2016-09-02 14:19 ` Herbert Xu [this message]
2016-09-02 15:24 ` Jilles Tjoelker
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=20160902141912.GA12739@gondor.apana.org.au \
--to=herbert@gondor.apana.org.au \
--cc=dash@vger.kernel.org \
--cc=harald@gigawatt.nl \
--cc=jilles@stack.nl \
--cc=luigi.tarenga@gmail.com \
/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.
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).