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

Re: bug with for and |&



> On Dec 18,  2:22pm, Akim Demaille wrote:
> }
> } /tmp % for i in 1 2
> } do                 
> } ls                   
> } done |& tee /tmp/foof
> } # I have to C-c C-c to stop it.
> } # s/|&/|/ makes it work properly.
> 
> For what it's worth, I'm *not* able to reproduce this here.
> 
> The difference may be that I have Sven's patch from zsh-workers/13247 applied

That doesn't make any difference to me.  The extra `&' is certainly the
problem.  You can work around it by sticking 2>&1 after the ls; 2>&1 after
the `done' has the same effect as the original.  There's problem some
difficulty with the logic in execcmd().

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
Cambridge Silicon Radio, Unit 300, Science Park, Milton Road,
Cambridge, CB4 0XL, UK                          Tel: +44 (0)1223 392070



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