fix for local variable problem in EXIT trap; add sed-like behavior for null patterns in pattern substitution

This commit is contained in:
Chet Ramey
2022-07-19 11:42:23 -04:00
parent 87a6e89edc
commit 52ae6c3f5d
12 changed files with 125 additions and 45 deletions
+3 -3
View File
@@ -1200,7 +1200,7 @@ simple_list: simple_list1
{
$$ = $1;
if (need_here_doc)
gather_here_documents ();
gather_here_documents (); /* XXX */
if ((parser_state & PST_CMDSUBST) && current_token == shell_eof_token)
{
INTERNAL_DEBUG (("LEGACY: parser: command substitution simple_list1 -> simple_list"));
@@ -1218,7 +1218,7 @@ INTERNAL_DEBUG (("LEGACY: parser: command substitution simple_list1 -> simple_li
else
$$ = command_connect ($1, (COMMAND *)NULL, '&');
if (need_here_doc)
gather_here_documents ();
gather_here_documents (); /* XXX */
if ((parser_state & PST_CMDSUBST) && current_token == shell_eof_token)
{
INTERNAL_DEBUG (("LEGACY: parser: command substitution simple_list1 '&' -> simple_list"));
@@ -1233,7 +1233,7 @@ INTERNAL_DEBUG (("LEGACY: parser: command substitution simple_list1 '&' -> simpl
{
$$ = $1;
if (need_here_doc)
gather_here_documents ();
gather_here_documents (); /* XXX */
if ((parser_state & PST_CMDSUBST) && current_token == shell_eof_token)
{
INTERNAL_DEBUG (("LEGACY: parser: command substitution simple_list1 ';' -> simple_list"));