Expected result: either an error or (ideally) setting a=y b=1, iterating once, then setting a=z b=3; printing each of those pairs on its own line.
Actual result: 4 blank lines
Proof of what is actually happening:
for a,b in y 1 z 3; set -l; end
Result:
a,b y
a,b 1
a,b z
a,b 3
In other words, for is assigning to a variable named "a,b".
This variable cannot be expanded (echo $a,b expands correctly to nothing ($a is not set, and therefore the product of it with ",b" is nothing)), nor can the user set, query, or erase this variable.
fish version 3.0.2-824-gbf40f84b0
The text was updated successfully, but these errors were encountered:
for a,b in y 1 z 3; echo $a,$b; end
Expected result: either an error or (ideally) setting a=y b=1, iterating once, then setting a=z b=3; printing each of those pairs on its own line.
Actual result: 4 blank lines
Proof of what is actually happening:
for a,b in y 1 z 3; set -l; end
Result:
In other words,
for
is assigning to a variable named "a,b".This variable cannot be expanded (
echo $a,b
expands correctly to nothing ($a is not set, and therefore the product of it with ",b" is nothing)), nor can the user set, query, or erase this variable.fish version 3.0.2-824-gbf40f84b0
The text was updated successfully, but these errors were encountered: