aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorJilles Tjoelker <jilles@FreeBSD.org>2013-01-13 19:19:40 +0000
committerJilles Tjoelker <jilles@FreeBSD.org>2013-01-13 19:19:40 +0000
commit2c090c7168eb9be9232176845bf0d93261122110 (patch)
tree69e38a953148ba5a234ec291b11123361e88e213 /bin
parent6a347d023b6f100dd86284723c03496d06c4736c (diff)
Notes
Diffstat (limited to 'bin')
-rw-r--r--bin/sh/parser.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/sh/parser.c b/bin/sh/parser.c
index ef1aa360abbb..a19ca3127bd3 100644
--- a/bin/sh/parser.c
+++ b/bin/sh/parser.c
@@ -286,7 +286,8 @@ list(int nlflag, int erflag)
tokpushback++;
}
checkkwd = CHKNL | CHKKWD | CHKALIAS;
- if (!nlflag && !erflag && tokendlist[peektoken()])
+ if (!nlflag && (erflag ? peektoken() == TEOF :
+ tokendlist[peektoken()]))
return ntop;
break;
case TEOF: