commit bash-20120629 snapshot

This commit is contained in:
Chet Ramey
2012-07-07 12:26:10 -04:00
parent c74f63f39f
commit d42cb8c15b
37 changed files with 20781 additions and 63 deletions
+8 -5
View File
@@ -2588,11 +2588,7 @@ execute_for_command (for_command)
/* Save this command unless it's a trap command and we're not running
a debug trap. */
#if 0
if (signal_in_progress (DEBUG_TRAP) == 0 && (this_command_name == 0 || (STREQ (this_command_name, "trap") == 0)))
#else
if (signal_in_progress (DEBUG_TRAP) == 0 && running_trap == 0)
#endif
{
FREE (the_printed_command_except_trap);
the_printed_command_except_trap = savestring (the_printed_command);
@@ -2607,7 +2603,14 @@ execute_for_command (for_command)
#endif
this_command_name = (char *)NULL;
v = bind_variable (identifier, list->word->word, 0);
/* XXX - special ksh93 for command index variable handling */
v = find_variable_last_nameref (identifier);
if (v && nameref_p (v))
{
v = bind_variable_value (v, list->word->word, 0);
}
else
v = bind_variable (identifier, list->word->word, 0);
if (readonly_p (v) || noassign_p (v))
{
line_number = save_line_number;