optimize asynchronous function invocations; fix for running return from trap while sourcing a file; restore completion function if read -e is interrupted

This commit is contained in:
Chet Ramey
2024-08-15 16:37:54 -04:00
parent 772e7e760e
commit cf694865de
12 changed files with 129 additions and 39 deletions
+1 -1
View File
@@ -138,7 +138,7 @@ should_suppress_fork (COMMAND *command)
int
can_optimize_connection (COMMAND *command)
{
return (*bash_input.location.string == '\0' &&
return ((bash_input.type != st_string || *bash_input.location.string == '\0') &&
parser_expanding_alias () == 0 &&
(command->value.Connection->connector == AND_AND || command->value.Connection->connector == OR_OR || command->value.Connection->connector == ';') &&
command->value.Connection->second->type == cm_simple);