summaryrefslogtreecommitdiff
path: root/y.tab.c
diff options
context:
space:
mode:
authorChet Ramey <chet.ramey@case.edu>2022-11-07 11:42:07 -0500
committerChet Ramey <chet.ramey@case.edu>2022-11-07 11:42:07 -0500
commit8c9524f9c4b0242bd2239043118984b781bb60ab (patch)
tree3654403149cba40e2b4c741d7dd3209a6284bf41 /y.tab.c
parent7b9954e67aab9fed742becbfd77dcb1cbcf423bc (diff)
downloadbash-8c9524f9c4b0242bd2239043118984b781bb60ab.tar.gz
Bash-5.2 patch 6: fix for interrupting command substitution in interactive shells disabling aliases
Diffstat (limited to 'y.tab.c')
-rw-r--r--y.tab.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/y.tab.c b/y.tab.c
index 32b4c7c1..0e516e6d 100644
--- a/y.tab.c
+++ b/y.tab.c
@@ -5617,6 +5617,8 @@ reset_parser ()
if (parser_state & (PST_EXTPAT|PST_CMDSUBST))
extended_glob = global_extglob;
#endif
+ if (parser_state & (PST_CMDSUBST|PST_STRING))
+ expand_aliases = expaliases_flag;
parser_state = 0;
here_doc_first_line = 0;
@@ -6699,6 +6701,7 @@ parse_string_to_command (string, flags)
if (flags & SX_COMPLETE)
parser_state |= PST_NOERROR;
+ parser_state |= PST_STRING;
expand_aliases = 0;
cmd = 0;
@@ -8712,7 +8715,7 @@ parse_string_to_word_list (s, flags, whom)
/* State flags we don't want to persist into compound assignments. */
parser_state &= ~PST_NOEXPAND; /* parse_comsub sentinel */
/* State flags we want to set for this run through the tokenizer. */
- parser_state |= PST_COMPASSIGN|PST_REPARSE;
+ parser_state |= PST_COMPASSIGN|PST_REPARSE|PST_STRING;
}
while ((tok = read_token (READ)) != yacc_EOF)