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

Bug(?) when using if list { list } syntax inside a for { } loop



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: signature.asc
Description: Digital signature



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