aboutsummaryrefslogtreecommitdiff
path: root/shell/hush.c
diff options
context:
space:
mode:
Diffstat (limited to 'shell/hush.c')
-rw-r--r--shell/hush.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/shell/hush.c b/shell/hush.c
index f8951d084..810dafd35 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -1429,6 +1429,7 @@ static void syntax_error_unterm_str(unsigned lineno UNUSED_PARAM, const char *s)
1429{ 1429{
1430 bb_error_msg("syntax error: unterminated %s", s); 1430 bb_error_msg("syntax error: unterminated %s", s);
1431//? source4.tests fails: in bash, echo ${^} in script does not terminate the script 1431//? source4.tests fails: in bash, echo ${^} in script does not terminate the script
1432// (but bash --posix, or if bash is run as "sh", does terminate in script, so maybe uncomment this?)
1432// die_if_script(); 1433// die_if_script();
1433} 1434}
1434 1435
@@ -7589,6 +7590,14 @@ static void parse_and_run_stream(struct in_str *inp, int end_trigger)
7589 } 7590 }
7590 /* Force prompt */ 7591 /* Force prompt */
7591 inp->p = NULL; 7592 inp->p = NULL;
7593 /* Clear "peeked" EOF. Without this,
7594 * $ { cmd }<Enter>
7595 * > ^D
7596 * hush: syntax error: unterminated {
7597 * exits interactive shell:
7598 */
7599 if (inp->peek_buf[0] == EOF)
7600 inp->peek_buf[0] = 0;
7592 /* This stream isn't empty */ 7601 /* This stream isn't empty */
7593 empty = 0; 7602 empty = 0;
7594 continue; 7603 continue;