@@ -91,6 +91,7 @@ should_suppress_fork (command)
91
91
return (startup_state == 2 && parse_and_execute_level == 1 &&
92
92
running_trap == 0 &&
93
93
* bash_input .location .string == '\0' &&
94
+ parser_expanding_alias () == 0 &&
94
95
command -> type == cm_simple &&
95
96
signal_is_trapped (EXIT_TRAP ) == 0 &&
96
97
signal_is_trapped (ERROR_TRAP ) == 0 &&
@@ -105,6 +106,7 @@ can_optimize_connection (command)
105
106
COMMAND * command ;
106
107
{
107
108
return (* bash_input .location .string == '\0' &&
109
+ parser_expanding_alias () == 0 &&
108
110
(command -> value .Connection -> connector == AND_AND || command -> value .Connection -> connector == OR_OR || command -> value .Connection -> connector == ';' ) &&
109
111
command -> value .Connection -> second -> type == cm_simple );
110
112
}
@@ -290,7 +292,7 @@ parse_and_execute (string, from_file, flags)
290
292
291
293
with_input_from_string (string , from_file );
292
294
clear_shell_input_line ();
293
- while (* (bash_input .location .string ))
295
+ while (* (bash_input .location .string ) || parser_expanding_alias () )
294
296
{
295
297
command = (COMMAND * )NULL ;
296
298
@@ -545,7 +547,7 @@ parse_string (string, from_file, flags, endp)
545
547
ostring = string ;
546
548
547
549
with_input_from_string (string , from_file );
548
- while (* (bash_input .location .string ))
550
+ while (* (bash_input .location .string )) /* XXX - parser_expanding_alias () ? */
549
551
{
550
552
command = (COMMAND * )NULL ;
551
553
0 commit comments