summaryrefslogtreecommitdiff
path: root/builtins/evalstring.c
diff options
context:
space:
mode:
authorChet Ramey <chet.ramey@case.edu>2023-05-15 13:30:18 -0400
committerChet Ramey <chet.ramey@case.edu>2023-05-15 13:30:18 -0400
commite44e3d50dee26d12927baca188ad2a44a0135173 (patch)
treee4ff8c47078cdd7b23901205f7e1db26cd1f2242 /builtins/evalstring.c
parentc375f8f45f4882db3098f9b54a19b75d2b176537 (diff)
downloadbash-devel.tar.gz
complete initial implementation of nofork command substitution (${ command; })devel
Diffstat (limited to 'builtins/evalstring.c')
-rw-r--r--builtins/evalstring.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtins/evalstring.c b/builtins/evalstring.c
index d5c13a51..1b00da2e 100644
--- a/builtins/evalstring.c
+++ b/builtins/evalstring.c
@@ -531,7 +531,7 @@ parse_and_execute (char *string, const char *from_file, int flags)
the global value of the flag (expaliases_flag) changes). */
local_expalias = expand_aliases;
local_alflag = expaliases_flag;
- if (subshell_environment & SUBSHELL_COMSUB)
+ if ((subshell_environment & SUBSHELL_COMSUB) || executing_funsub)
expand_aliases = expaliases_flag;
/* See if this is a candidate for $( <file ). */
@@ -552,7 +552,7 @@ parse_and_execute (char *string, const char *from_file, int flags)
discard_unwind_frame ("pe_dispose");
/* If the global value didn't change, we restore what we had. */
- if ((subshell_environment & SUBSHELL_COMSUB) && local_alflag == expaliases_flag)
+ if (((subshell_environment & SUBSHELL_COMSUB) || executing_funsub) && local_alflag == expaliases_flag)
expand_aliases = local_expalias;
if (flags & SEVAL_ONECMD)