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

Local variable declaration in loops buglet...



Just found this one:

  % zsh -f
  ceramic% echo $ZSH_VERSION
  4.0.6
  ceramic% foo() { for i in 1 2 3; do local x; x=$i;done }
  ceramic% foo
  x=1
  x=2
  ceramic% 

Moving the local out of the loop fixes the echo of course... But I do
not think it should matter.

Phil.



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