From af071465b1ef324f35741c681529f39b88a95f51 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Sun, 28 Aug 2011 17:06:27 +0000 Subject: 29731: fix read -AE, test that and read -Ae --- ChangeLog | 5 ++++- Src/builtin.c | 4 ++-- Test/B04read.ztst | 17 +++++++++++++++++ 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 58e06d4da..80de37809 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2011-08-28 Peter Stephenson + * 29731: Src/builtin.c, Test/B04read.ztst: fix output from `read + -AE' and test that and `read -Ae'. + * users/16289: Doc/Zsh/expn.yo, Src/exec.c, Src/jobs.c: don't delete temporary files when disowning and document this. @@ -15335,5 +15338,5 @@ ***************************************************** * This is used by the shell to define $ZSH_PATCHLEVEL -* $Revision: 1.5446 $ +* $Revision: 1.5447 $ ***************************************************** diff --git a/Src/builtin.c b/Src/builtin.c index 9b34ef7c0..175607644 100644 --- a/Src/builtin.c +++ b/Src/builtin.c @@ -5549,7 +5549,7 @@ bin_read(char *name, char **args, Options ops, UNUSED(int func)) *bptr = '\0'; #endif /* dispose of word appropriately */ - if (OPT_ISSET(ops,'e') || OPT_ISSET(ops,'E')) { + if (OPT_ISSET(ops,'e')) { zputs(buf, stdout); putchar('\n'); } @@ -5581,7 +5581,7 @@ bin_read(char *name, char **args, Options ops, UNUSED(int func)) : (char **)zalloc((al + 1) * sizeof(char *))); for (pp = p, n = firstnode(readll); n; incnode(n)) { - if (OPT_ISSET(ops,'e') || OPT_ISSET(ops,'E')) { + if (OPT_ISSET(ops,'E')) { zputs((char *) getdata(n), stdout); putchar('\n'); } diff --git a/Test/B04read.ztst b/Test/B04read.ztst index ad427dc0d..25c3d4173 100644 --- a/Test/B04read.ztst +++ b/Test/B04read.ztst @@ -93,3 +93,20 @@ read foo) <<one +>two +>three +>one:two:three + + array=() + read -Ae array <<<'four five six' + print ${(j.:.)array} +0:Behaviour of -A and -e combination +>four +>five +>six +> -- cgit 1.4.1