summaryrefslogtreecommitdiffstats
path: root/bin/sh
diff options
context:
space:
mode:
Diffstat (limited to 'bin/sh')
-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 ef1aa36..a19ca31 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:
OpenPOWER on IntegriCloud