Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

possible bug in zsh concerning a for loop



Hi!

I tried to get a normal for loop to work with zsh. Now I think I found a
bug (zsh is 5.7.1).

A short script is
----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<
#!/bin/zsh

items="item1 item2 item3"

for i in $items; do
  echo "\"$i\""
done
----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<

This prints:
"item1 item2 item3"

It should print:
"item1"
"item2"
"item3"

I hope that somebody can verify this.

Thanks in advance
Leander Jedamus
--
.o.
_^_ Ich bin nicht das Problem. Ich bin die Lösung.




Messages sorted by: Reverse Date, Date, Thread, Author