Closed aleeraser closed 7 months ago
I cannot reproduce on master (see below) nor can I on the latest release either.
$ cat f.sh
for element in element{1,2,3}; do
echo $element
done
$ bash f.sh
element1
element2
element3
$ shfmt f.sh
for element in element{1,2,3}; do
echo $element
done
$ shfmt -ln=posix f.sh
for element in element{1,2,3}; do
echo $element
done
$ shfmt -version
v3.7.1-0.20231121134735-4f714c73a14e
That's really weird. I can't reproduce it as well. Sorry for that, closing until I face it again.
The following
for
loop reports an incorrect"for foo [in words]" must be followed by "do"
: