From 1182a75e1b4d46a42935a217e80a2955b76be1a5 Mon Sep 17 00:00:00 2001 From: Barton Schaefer Date: Mon, 20 May 2013 22:44:03 -0700 Subject: 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. --- Src/builtin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Src/builtin.c') 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++; -- cgit 1.4.1