zsh-workers
 help / color / mirror / code / Atom feed
* Bug(?) when using if list { list } syntax inside a for { } loop
@ 2011-09-05  8:47 Daniel Friesel
  2011-09-05  9:08 ` Peter Stephenson
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Friesel @ 2011-09-05  8:47 UTC (permalink / raw)
  To: zsh-workers

[-- Attachment #1: Type: text/plain, Size: 595 bytes --]

Hi everyone,

It looks like it's not possible to use if [[ ]] { } syntax inside a for { } loop:

descent ~/bin > for i (*) { if [[ -r $i ]] { echo $i } }
for elif> 

when explicitly adding an else it works fine, though:

descent ~/bin > for i (*) { if [[ -r $i ]] { echo $i } else { } }

it also works when adding a semicolon to the end of the if { }:

descent ~/bin > for i (*) { if [[ -r $i ]] { echo $i }; }

I'm not quite sure if this is a bug, at least from the documentation it seems
like it should work.

zsh version 4.3.12-dev-1-cvs0820, patchlevel 1.5445

--Daniel

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-09-05 12:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-05  8:47 Bug(?) when using if list { list } syntax inside a for { } loop Daniel Friesel
2011-09-05  9:08 ` Peter Stephenson
2011-09-05 12:35   ` Daniel Friesel

Code repositories for project(s) associated with this public 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).