about summary refs log tree commit diff
path: root/Src/builtin.c
diff options
context:
space:
mode:
authorBarton Schaefer <schaefer@zsh.org>2013-05-20 22:44:03 -0700
committerBarton Schaefer <schaefer@zsh.org>2013-05-20 23:38:58 -0700
commit1182a75e1b4d46a42935a217e80a2955b76be1a5 (patch)
tree36822fdf6a9bbc1d75c7c0ca3c0afe7309cf193c /Src/builtin.c
parentaa7467b0bfcf1e28fd2b2b91a88040946c680e59 (diff)
downloadzsh-1182a75e1b4d46a42935a217e80a2955b76be1a5.tar.gz
zsh-1182a75e1b4d46a42935a217e80a2955b76be1a5.tar.xz
zsh-1182a75e1b4d46a42935a217e80a2955b76be1a5.zip
upon "read" of a short line, assign all variables passed as arguments.
It was noted that (print 1 2 | read one two three four) assigned values
only to $one and $two except in the case where EOF was reached.
Diffstat (limited to 'Src/builtin.c')
-rw-r--r--Src/builtin.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Src/builtin.c b/Src/builtin.c
index cd886437b..bc91578b3 100644
--- a/Src/builtin.c
+++ b/Src/builtin.c
@@ -5674,7 +5674,7 @@ bin_read(char *name, char **args, Options ops, UNUSED(int func))
 	    zputs(buf, stdout);
 	    putchar('\n');
 	}
-	if (!OPT_ISSET(ops,'e') && (*buf || first)) {
+	if (!OPT_ISSET(ops,'e') && (*buf || first || gotnl)) {
 	    if (OPT_ISSET(ops,'A')) {
 		addlinknode(readll, buf);
 		al++;