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

Re: while loop grammar question






On 2024-12-08 11:35, Lawrence Velázquez wrote:
On Sun, Dec 8, 2024, at 4:35 AM, Bart Schaefer wrote:
See the thread starting here:
https://www.zsh.org/mla/workers/2018/msg01398.html (workers/43595)
Thanks, what a mess.  Perhaps the documentation could elaborate
on the conditions under which "the end of the test will not be
recognized"?

I was discussing this privately with Mark.  It might be too much of a can of worms to dare touching, and as usual my understanding is likely to be shallow, but supposing that all conditional statements shared the same grammar?  I should perhaps say same syntax:

[condition] [controlling statement] { [body] }

... being the SHORT form of:

[condition] [controlling statement]; do { [body] } done

(or, in the case of an if condition:)
[condition] [controlling statement]; then { [body] } fi

... anyway Mark says just use do/done and there's no worries.








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