about summary refs log tree commit diff
path: root/Src/builtin.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2011-08-29 17:21:39 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2011-08-29 17:21:39 +0000
commita6de37ec2bd96c8a5c81999c71a6303dbe5b39f6 (patch)
tree18df3bfd8f5ed375c27e83843fa431d09ce5c6c4 /Src/builtin.c
parent557baa173c6be93e475d6e25d3fb0c80164d6e87 (diff)
downloadzsh-a6de37ec2bd96c8a5c81999c71a6303dbe5b39f6.tar.gz
zsh-a6de37ec2bd96c8a5c81999c71a6303dbe5b39f6.tar.xz
zsh-a6de37ec2bd96c8a5c81999c71a6303dbe5b39f6.zip
29744: don't mess up non '-A' cases in read -E fix
Diffstat (limited to 'Src/builtin.c')
-rw-r--r--Src/builtin.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/Src/builtin.c b/Src/builtin.c
index 175607644..71fc04ce1 100644
--- a/Src/builtin.c
+++ b/Src/builtin.c
@@ -5549,7 +5549,14 @@ bin_read(char *name, char **args, Options ops, UNUSED(int func))
 	*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');
 	}