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

Strange brace(}) behavior with multiple for loops



Hi everyone,

Checked on 5.7, 5.7.1, 5.8, 5.8.1 and 5.9

I had a problem with multiple for loop termination, so I simplified it.
On the command line I entered the following anonymous function:

% ()
{
  emulate -L zsh
  local     A B C
  local -a  T=(1 2 3)
  for A ($T) { for B ($T) { for C ($T) {  print -- $A $B $C }}}
} | less

  "} } }" , "}} }" and "} }}"  work
  "}}}" waits with "function for> " message

Depending on how I terminate the loops(see above) the anonymous function either
works or fails if using 3 braces(}}}) togather(no spaces).

Q:  Is this a bug, or am I missing something?

Google search so far hasn't yielded anything useful.

Regards,

Jim Murphy


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