diff options
-rw-r--r-- | bin/sh/parser.c | 1 | ||||
-rw-r--r-- | tools/regression/bin/sh/parser/heredoc6.0 | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/bin/sh/parser.c b/bin/sh/parser.c index c9305b3..05015d2 100644 --- a/bin/sh/parser.c +++ b/bin/sh/parser.c @@ -203,6 +203,7 @@ parsecmd(int interact) * which could happen if we add command substitution on PS1/PS2. */ parser_temp_free_all(); + heredoclist = NULL; tokpushback = 0; doprompt = interact; diff --git a/tools/regression/bin/sh/parser/heredoc6.0 b/tools/regression/bin/sh/parser/heredoc6.0 new file mode 100644 index 0000000..3a634de --- /dev/null +++ b/tools/regression/bin/sh/parser/heredoc6.0 @@ -0,0 +1,5 @@ +# $FreeBSD$ + +r= +! command eval ": <<EOF; )" 2>/dev/null; command eval : hi \${r:=0} +exit ${r:-3} |