The correct behavior (and the behavior that comes from variations on the command, like putting {} around the echo $x, is to only print one y.
Digging around with gdb I see the bogus extra y gets added in eval.c:418 (list = append(list, list->next);). Commenting out that line fixes the issue, and strangely seems to be a no-op in most other cases -- trip.es passes, and I can do at least some basic navigating in an interactive shell. It looks like list->next at this point in the code is typically null.
Is it reasonable to delete the line? Can anyone find something that would break?
See the following command:
The correct behavior (and the behavior that comes from variations on the command, like putting
{}
around theecho $x
, is to only print oney
.Digging around with gdb I see the bogus extra
y
gets added in eval.c:418 (list = append(list, list->next);
). Commenting out that line fixes the issue, and strangely seems to be a no-op in most other cases -- trip.es passes, and I can do at least some basic navigating in an interactive shell. It looks likelist->next
at this point in the code is typically null.Is it reasonable to delete the line? Can anyone find something that would break?