From: Peter Stephenson <p.w.stephenson@ntlworld.com>
To: zsh-workers@zsh.org
Subject: Re: Is "read -AE" buggy?
Date: Mon, 29 Aug 2011 18:06:24 +0100 [thread overview]
Message-ID: <20110829180624.66c89634@pws-pc.ntlworld.com> (raw)
In-Reply-To: <110829082605.ZM2790@torch.brasslantern.com>
I think I should be a bit more careful in the non '-A' case.
Index: Src/builtin.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/builtin.c,v
retrieving revision 1.253
diff -p -u -r1.253 builtin.c
--- Src/builtin.c 28 Aug 2011 17:06:27 -0000 1.253
+++ Src/builtin.c 29 Aug 2011 17:05:24 -0000
@@ -5549,7 +5549,14 @@ bin_read(char *name, char **args, Option
*bptr = '\0';
#endif
/* dispose of word appropriately */
- if (OPT_ISSET(ops,'e')) {
+ if (OPT_ISSET(ops,'e') ||
+ /*
+ * When we're doing an array assignment, we'll
+ * handle echoing at that point. In all other
+ * cases (including -A with no assignment)
+ * we'll do it here.
+ */
+ (OPT_ISSET(ops,'E') && !OPT_ISSET(ops,'A'))) {
zputs(buf, stdout);
putchar('\n');
}
--
Peter Stephenson <p.w.stephenson@ntlworld.com>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/
prev parent reply other threads:[~2011-08-29 17:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-23 7:18 Bart Schaefer
2011-08-28 16:50 ` Peter Stephenson
2011-08-29 15:26 ` Bart Schaefer
2011-08-29 17:06 ` Peter Stephenson [this message]
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=20110829180624.66c89634@pws-pc.ntlworld.com \
--to=p.w.stephenson@ntlworld.com \
--cc=zsh-workers@zsh.org \
/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).