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

Re: for loop question



2014-11-03 18:43:38 -0800, Bart Schaefer:
[...]
> This could be written a LOT more plainly as
> 
>     for ((i=1; $([ -n "$TLC[i]" ]; echo $?) == 0; i++))
[...]

Oh, for some reason, I didn't expect that to work assuming the
$(...) would be expanded only once before the loop starts which
of course was stupid. It was not my intention to obfuscate the
code.

-- 
Stephane



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