From a6de37ec2bd96c8a5c81999c71a6303dbe5b39f6 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Mon, 29 Aug 2011 17:21:39 +0000 Subject: 29744: don't mess up non '-A' cases in read -E fix --- Src/builtin.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'Src/builtin.c') 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'); } -- cgit 1.4.1