a select command invalid selection variable name is now a fatal error in posix mode; many test suite additions

This commit is contained in:
Chet Ramey
2023-09-25 15:08:04 -04:00
parent 1cc5a8f752
commit b3958b3ab4
56 changed files with 903 additions and 147 deletions
+6 -2
View File
@@ -124,6 +124,10 @@ command_builtin (WORD_LIST *list)
#define COMMAND_BUILTIN_FLAGS (CMD_NO_FUNCTIONS | CMD_INHIBIT_EXPANSION | CMD_COMMAND_BUILTIN | (use_standard_path ? CMD_STDPATH : 0))
/* This code isn't executed any more; look at execute_cmd.c:execute_simple_command()
where command is treated as a pseudo-reserved prefix so we can optimize
away forks where possible. */
/* We don't want this to be reparsed (consider command echo 'foo &'), so
just make a simple_command structure and call execute_command with it. */
command = make_bare_simple_command (line_number);
@@ -134,8 +138,8 @@ command_builtin (WORD_LIST *list)
add_unwind_protect (uw_dispose_command, command);
result = execute_command (command);
dispose_command (command);
run_unwind_frame ("command_builtin");
discard_unwind_frame ("command_builtin");
return (result);
}