zsh-users
 help / color / mirror / code / Atom feed
From: Leander Jedamus <ljedamus@web.de>
To: Zsh Users <zsh-users@zsh.org>
Subject: possible bug in zsh concerning a for loop
Date: Fri, 18 Mar 2022 09:21:37 +0100	[thread overview]
Message-ID: <fe096c02-eb27-f8fd-8a09-b05cb608b92b@web.de> (raw)

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.


             reply	other threads:[~2022-03-18  8:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-18  8:21 Leander Jedamus [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-03-18 10:12 Leander Jedamus
2022-03-18  7:33 Leander Jedamus
2022-03-18  8:45 ` Jun T
2022-03-18 14:14   ` Vincent Lefevre

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fe096c02-eb27-f8fd-8a09-b05cb608b92b@web.de \
    --to=ljedamus@web.de \
    --cc=zsh-users@zsh.org \
    --subject='Re: possible bug in zsh concerning a for loop' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Code repositories for project(s) associated with this inbox:

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).